Package org.terracotta.context
Interface TreeNode
-
- All Superinterfaces:
WeakIdentityHashMap.Cleanable
- All Known Implementing Classes:
AbstractTreeNode,ContextAwareTreeNode,MutableTreeNode,RootNode
public interface TreeNode extends WeakIdentityHashMap.Cleanable
A context tree node associated with a Java object.A
TreeNodeallows access to both the context information associated with a Java object and to information regarding the contexts position within the overall context tree or trees.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<? extends TreeNode>getChildren()Returns the immediate children of this context.ContextElementgetContext()Returns the context information associated with this node.java.util.List<? extends TreeNode>getPath()Returns the unique rooting path of this context element.java.util.Collection<java.util.List<? extends TreeNode>>getPaths()Returns the complete set of rooting paths for this context element.java.lang.StringtoTreeString()-
Methods inherited from interface org.terracotta.context.WeakIdentityHashMap.Cleanable
clean
-
-
-
-
Method Detail
-
getChildren
java.util.Set<? extends TreeNode> getChildren()
Returns the immediate children of this context.- Returns:
- the context children
-
getPath
java.util.List<? extends TreeNode> getPath() throws java.lang.IllegalStateException
Returns the unique rooting path of this context element.If this context element is not connected to a root in any ContextManager instance or is rooted via multiple distinct paths then an
IllegalStateExceptionwill be thrown.- Returns:
- the unique rooting path
- Throws:
java.lang.IllegalStateException- if the context is not uniquely rooted
-
getPaths
java.util.Collection<java.util.List<? extends TreeNode>> getPaths()
Returns the complete set of rooting paths for this context element.- Returns:
- the set of rooting paths
-
getContext
ContextElement getContext()
Returns the context information associated with this node.- Returns:
- node context information
-
toTreeString
java.lang.String toTreeString()
-
-