Top Description Methods
org.terracotta.context

public Interface TreeNode

extends Cleanable
Known Direct Implementers
org.terracotta.context.AbstractTreeNode, org.terracotta.context.ContextAwareTreeNode
Imports
java.util.Collection, .List, .Set

A context tree node associated with a Java object.

A TreeNode allows 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

Modifier and TypeMethod and Description
public Set<? extends TreeNode>

Returns:

the context children
getChildren
()

Returns the immediate children of this context.

public ContextElement

Returns:

node context information
getContext
()

Returns the context information associated with this node.

public List<? extends TreeNode>

Returns:

the unique rooting path
getPath
()

Returns the unique rooting path of this context element.

public Collection<List<? extends TreeNode>>

Returns:

the set of rooting paths
getPaths
()

Returns the complete set of rooting paths for this context element.

public String
Inherited from org.terracotta.context.WeakIdentityHashMap.Cleanable:
clean

Method Detail

getChildrenback to summary
public Set<? extends TreeNode> getChildren()

Returns the immediate children of this context.

Returns:Set<? extends TreeNode>

the context children

getContextback to summary
public ContextElement getContext()

Returns the context information associated with this node.

Returns:ContextElement

node context information

getPathback to summary
public List<? extends TreeNode> getPath() throws 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 IllegalStateException will be thrown.

Returns:List<? extends TreeNode>

the unique rooting path

Exceptions
IllegalStateException:
if the context is not uniquely rooted
getPathsback to summary
public Collection<List<? extends TreeNode>> getPaths()

Returns the complete set of rooting paths for this context element.

Returns:Collection<List<? extends TreeNode>>

the set of rooting paths

toTreeStringback to summary
public String toTreeString()