@Immutable protected static final class LazyCachedNode.RootParentReferenceToSelf extends Object implements LazyCachedNode.ParentReferenceToSelf
LazyCachedNode.ParentReferenceToSelf
implementation used only for the root node. The root node never changes, but it is the only
node that does not have a ChildReference
pointing to it. Since ModeShape keeps all node names within the
ChildReference
instances, this method simply holds onto a special ChildReference that contains the root's name
.
This class is immutable, and it is only used for the root LazyCachedNode
instance (which can indeed change as
properties and children are added/removed/changed.
Modifier | Constructor and Description |
---|---|
protected |
RootParentReferenceToSelf(WorkspaceCache cache) |
Modifier and Type | Method and Description |
---|---|
ChildReference |
childReferenceInParent()
Get the cached
ChildReference instance. |
boolean |
isComplete()
Determine if this object is still complete.
|
boolean |
isRoot()
Get whether this represents the
child reference pointing to the root node. |
boolean |
isValid(CachedNode recentParent)
Determine if this instance is still valid, given the supplied
CachedNode instance that represents the
most-recently acquired parent node representation. |
String |
toString() |
protected RootParentReferenceToSelf(WorkspaceCache cache)
public boolean isRoot()
LazyCachedNode.ParentReferenceToSelf
child reference
pointing to the root node.isRoot
in interface LazyCachedNode.ParentReferenceToSelf
public ChildReference childReferenceInParent()
LazyCachedNode.ParentReferenceToSelf
ChildReference
instance.childReferenceInParent
in interface LazyCachedNode.ParentReferenceToSelf
public boolean isComplete()
LazyCachedNode.ParentReferenceToSelf
isComplete
in interface LazyCachedNode.ParentReferenceToSelf
public boolean isValid(CachedNode recentParent)
LazyCachedNode.ParentReferenceToSelf
CachedNode
instance that represents the
most-recently acquired parent node representation.isValid
in interface LazyCachedNode.ParentReferenceToSelf
recentParent
- the most recent cached node for the parentCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.