org.jboss.dna.jcr.cache
Interface Children

All Superinterfaces:
Iterable<ChildNode>
All Known Implementing Classes:
ChangedChildren, EmptyChildren, ImmutableChildren

public interface Children
extends Iterable<ChildNode>

Class that maintains the ordered list of ChildNode instances yet allows fast access to the children with a specified name.


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.
 int size()
          Get the number of children.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

size

int size()
Get the number of children.

Returns:
the number of children

getParentUuid

UUID getParentUuid()
The UUID of the parent node.

Returns:
the parent node's UUID

getChild

ChildNode getChild(UUID uuid)
Get the child with the given UUID.

Parameters:
uuid - the UUID of the child node
Returns:
the child node, or null if there is no child with the supplied UUID

getChild

ChildNode getChild(Path.Segment segment)
Get the child given the path segment.

Parameters:
segment - the path segment for the child, which includes the name and one-based same-name-sibling index; may not be null
Returns:
the information for the child node, or null if no such child existed

getChildren

Iterator<ChildNode> getChildren(Name name)
Get the same-name-sibling children that all share the supplied name, in order of increasing SNS index.

Parameters:
name - the name for the children; may not be null
Returns:
the children with the supplied name; never null

getCountOfSameNameSiblingsWithName

int getCountOfSameNameSiblingsWithName(Name name)
Get the number of same-name-siblings that all share the supplied name.

Parameters:
name - the name for the children; may not be null
Returns:
the number of same-name-siblings with the supplied name


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.