|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.jcr.cache.ImmutableChildren
@Immutable public class ImmutableChildren

An immutable implementation of Children.
| Constructor Summary | |
|---|---|
ImmutableChildren(UUID parentUuid)
|
|
ImmutableChildren(UUID parentUuid,
Iterable<Location> children)
|
|
| Method Summary | |
|---|---|
ChildNode |
getChild(Path.Segment segment)
Get the child given the path segment. |
ChildNode |
getChild(UUID uuid)
Get the child with the given UUID. |
Iterator<ChildNode> |
getChildren(Name name)
Get the same-name-sibling children that all share the supplied name, in order of increasing SNS index. |
int |
getCountOfSameNameSiblingsWithName(Name name)
Get the number of same-name-siblings that all share the supplied name. |
UUID |
getParentUuid()
The UUID of the parent node. |
Iterator<ChildNode> |
iterator()
|
int |
size()
Get the number of children. |
String |
toString()
|
ChangedChildren |
with(Name newChildName,
UUID newChildUuid,
PathFactory pathFactory)
Create another Children object that is equivalent to this node but with the supplied child added. |
ChangedChildren |
without(UUID childUuid,
PathFactory pathFactory)
Create another Children object that is equivalent to this node but without the supplied child. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImmutableChildren(UUID parentUuid,
Iterable<Location> children)
public ImmutableChildren(UUID parentUuid)
| Method Detail |
|---|
public int size()
size in interface ChildrenChildren.size()public Iterator<ChildNode> iterator()
iterator in interface Iterable<ChildNode>Iterable.iterator()public UUID getParentUuid()
getParentUuid in interface ChildrenChildren.getParentUuid()public ChildNode getChild(UUID uuid)
getChild in interface Childrenuuid - the UUID of the child node
Children.getChild(java.util.UUID)public ChildNode getChild(Path.Segment segment)
getChild in interface Childrensegment - the path segment for the child, which includes the name and
one-based same-name-sibling index; may not be null
Children.getChild(org.jboss.dna.graph.property.Path.Segment)public Iterator<ChildNode> getChildren(Name name)
getChildren in interface Childrenname - the name for the children; may not be null
Children.getChildren(org.jboss.dna.graph.property.Name)public int getCountOfSameNameSiblingsWithName(Name name)
getCountOfSameNameSiblingsWithName in interface Childrenname - the name for the children; may not be null
Children.getCountOfSameNameSiblingsWithName(org.jboss.dna.graph.property.Name)
public ChangedChildren with(Name newChildName,
UUID newChildUuid,
PathFactory pathFactory)
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.
InternalChildren.with(org.jboss.dna.graph.property.Name, java.util.UUID,
org.jboss.dna.graph.property.PathFactory)
public ChangedChildren without(UUID childUuid,
PathFactory pathFactory)
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.
InternalChildren.without(java.util.UUID, org.jboss.dna.graph.property.PathFactory)public String toString()
toString in class ObjectObject.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||