org.jboss.dna.jcr.cache
Class ChangedChildren
java.lang.Object
org.jboss.dna.jcr.cache.ImmutableChildren
org.jboss.dna.jcr.cache.ChangedChildren
- All Implemented Interfaces:
- Iterable<ChildNode>, Children
@NotThreadSafe
public class ChangedChildren
- extends ImmutableChildren
A non-thread safe
implementation of Children
that can be modified in place. This is typically
used to capture changes made within a session.
ChangedChildren
public ChangedChildren(Children original)
with
public ChangedChildren with(Name newChildName,
UUID newChildUuid,
PathFactory pathFactory)
- Create another Children object that is equivalent to this node but with the supplied child added.
- Overrides:
with
in class ImmutableChildren
- Parameters:
newChildName
- the name of the new child; may not be nullnewChildUuid
- the UUID of the new child; may not be nullpathFactory
- the factory that can be used to create Path and/or Path.Segment instances.
- Returns:
- the new Children object; never null
- See Also:
ImmutableChildren.with(org.jboss.dna.graph.property.Name, java.util.UUID,
org.jboss.dna.graph.property.PathFactory)
with
public ChangedChildren with(Name newChildName,
Path.Segment beforeChild,
UUID newChildUuid,
PathFactory pathFactory)
- Create another Children object that is equivalent to this node but with the supplied child added before the named node.
- Parameters:
newChildName
- the name of the new child; may not be nullbeforeChild
- the path segment of the child before which this node should be added; may not be nullnewChildUuid
- the UUID of the new child; may not be nullpathFactory
- the factory that can be used to create Path and/or Path.Segment instances.
- Returns:
- the new Children object; never null
without
public ChangedChildren without(UUID childUuid,
PathFactory pathFactory)
- Create another Children object that is equivalent to this node but without the supplied child.
- Overrides:
without
in class ImmutableChildren
- Parameters:
childUuid
- the UUID of the child to be removed; may not be nullpathFactory
- the factory that can be used to create Path and/or Path.Segment instances.
- Returns:
- the new Children object; never null
- See Also:
ImmutableChildren.without(java.util.UUID, org.jboss.dna.graph.property.PathFactory)
Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.