|
ModeShape Distribution 3.0.0.CR3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Immutable public interface ChildReferences
An interface used to access the ChildReference instances owned by a parent node.
| Nested Class Summary | |
|---|---|
static class |
ChildReferences.BasicContext
A ChildReferences.Context implementation that has no changes but maintains the SNS indexes for nodes with any name. |
static interface |
ChildReferences.Changes
The representation of a set of changes for the child references. |
static interface |
ChildReferences.ChildInsertions
A representation of the child references that were inserted before some other node. |
static interface |
ChildReferences.Context
The context in which the names are evaluated. |
static class |
ChildReferences.NoChanges
|
static class |
ChildReferences.NoContext
A ChildReferences.Changes implementation that has no changes and that is useful when there are never any siblings
with the same names, since it always returns '1' for the SNS index. |
static class |
ChildReferences.NoSnsIndexesContext
A ChildReferences.Context implementation that has no changes and that always returns '1' for the SNS index. |
static class |
ChildReferences.SingleNameContext
A ChildReferences.Context implementation that has no changes and can be used to find the SNS indexes for nodes
named a single name. |
static class |
ChildReferences.WithChanges
A ChildReferences.Context implementation that has changes and can be used to find the SNS indexes for nodes named a
single name. |
| Method Summary | |
|---|---|
Iterator<NodeKey> |
getAllKeys()
Get the keys for all of the children. |
ChildReference |
getChild(Name name)
Look for the child reference that has the given name and a SNS index of '1'. |
ChildReference |
getChild(Name name,
int snsIndex)
Look for the child reference that has the given name and SNS index. |
ChildReference |
getChild(Name name,
int snsIndex,
ChildReferences.Context context)
Look for the child reference that has the given name and SNS index. |
ChildReference |
getChild(NodeKey key)
Look for the child reference that has the node key. |
ChildReference |
getChild(NodeKey key,
ChildReferences.Context context)
Look for the child reference that has the node key. |
ChildReference |
getChild(Path.Segment segment)
Look for the child reference that has the given name and SNS index. |
int |
getChildCount(Name name)
Return the number of nodes that have the supplied name. |
boolean |
hasChild(NodeKey key)
Determine if this contains a reference to the specified child. |
boolean |
isEmpty()
Determine if there are no references in this container. |
Iterator<ChildReference> |
iterator()
Get an iterator over all of the children. |
Iterator<ChildReference> |
iterator(ChildReferences.Context context)
Get an iterator over all child references in this collection, using the supplied context. |
Iterator<ChildReference> |
iterator(ChildReferences.Context context,
Collection<?> namePatterns,
NamespaceRegistry registry)
Get an iterator over all of the children that have names matching at least one of the supplied patterns, using the supplied context. |
Iterator<ChildReference> |
iterator(Collection<?> namePatterns,
NamespaceRegistry registry)
Get an iterator over all of the children that have names matching at least one of the supplied patterns. |
Iterator<ChildReference> |
iterator(Name name)
Get an iterator over all of the children that have same name matching the supplied value. |
Iterator<ChildReference> |
iterator(Name name,
ChildReferences.Context context)
Get an iterator over all of the children that have same name matching the supplied value. |
long |
size()
Get the total number of child references for the node, including all subsequent blocks of ChildReferences. |
| Method Detail |
|---|
long size()
boolean isEmpty()
size() == 0 but may be
faster.
int getChildCount(Name name)
name - the name
ChildReference getChild(Name name)
name - the name for the node
ChildReference getChild(Name name,
int snsIndex)
name - the name for the nodesnsIndex - the same-name-sibling index; must be positive
ChildReference getChild(Name name,
int snsIndex,
ChildReferences.Context context)
name - the name for the nodesnsIndex - the same-name-sibling index; must be positivecontext - the context in which the child should be evaluated; may be null if there is no context
ChildReference getChild(Path.Segment segment)
segment - the path segment, which defines the name and SNS index
boolean hasChild(NodeKey key)
key - the node key of the child
ChildReference getChild(NodeKey key)
key - the node key of the child
ChildReference getChild(NodeKey key,
ChildReferences.Context context)
key - the node key of the childcontext - the context in which the child should be evaluated; may be null if there is no context
Iterator<ChildReference> iterator(Name name)
name - the name of the same-name-sibling nodes; may not be null
Iterator<ChildReference> iterator(Name name,
ChildReferences.Context context)
name - the name of the same-name-sibling nodes; may not be nullcontext - the context in which the child should be evaluated; may be null if there is no context
Iterator<ChildReference> iterator()
iterator in interface Iterable<ChildReference>
Iterator<ChildReference> iterator(Collection<?> namePatterns,
NamespaceRegistry registry)
namePatterns - the list of string literals or regex patterns describing the namesregistry - the namespace registry, used to convert names to a form compatible with the name patterns
Iterator<ChildReference> iterator(ChildReferences.Context context)
context - the context in which the child should be evaluated; may be null if there is no context
Iterator<ChildReference> iterator(ChildReferences.Context context,
Collection<?> namePatterns,
NamespaceRegistry registry)
context - the context in which the child should be evaluated; may be null if there is no contextnamePatterns - the list of string literals or regex patterns describing the namesregistry - the namespace registry, used to convert names to a form compatible with the name patterns
Iterator<NodeKey> getAllKeys()
|
ModeShape Distribution 3.0.0.CR3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||