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

The representation of a child node. This is an immutable representation of a child node within the collection of its siblings as the collection appeared at some point in time. This should be used as a guide to determine how long to hold onto references.
For example, adding and removing children may affect the same-name-sibling index of the children, so
these kinds of operations will result in the replacement of old ChildObject instances. Therefore, clients should generally find
the ChildNode instances in a Children container, use the ChildNode objects quickly, then discard their references.
There may be times when a client does wish to keep a representation of a ChildNode as it appeared at some moment in time, and so it may want to hold onto references to ChildNode objects for longer durations. This is fine, as long as it is understood that at some point the referenced ChildNode may no longer represent the current state.
| Constructor Summary | |
|---|---|
ChildNode(UUID uuid,
Path.Segment segment)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Name |
getName()
Get the name of the node. |
Path.Segment |
getSegment()
Get the path segment for this node. |
int |
getSnsIndex()
Get the same-name-sibling index of the node. |
UUID |
getUuid()
Get the UUID of the node. |
int |
hashCode()
|
String |
toString()
|
ChildNode |
with(Path.Segment newSegment)
Obtain a new instance that uses the same UUID but the supplied path segment. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChildNode(UUID uuid,
Path.Segment segment)
| Method Detail |
|---|
public UUID getUuid()
public Path.Segment getSegment()
public Name getName()
public int getSnsIndex()
public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()public ChildNode with(Path.Segment newSegment)
UUID but the supplied path segment.
newSegment - the new segment; may not be null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||