Package de.xima.fc.common.tree
Interface ITreeAccessor<Node,Identifier>
-
- Type Parameters:
Node- Type of the tree's nodes.Identifier- Type of the identifier of each node.
- All Known Subinterfaces:
ITreeAccessor<TNode,TIdentifier>,ITreeWithDataAccessor<TNode,TIdentifier,TNodeData>,ITreeWithDataAccessor<TNode,TIdentifier,TNodeData>
- All Known Implementing Classes:
ETreeAccessorWorkflowNode,GagawaNodeTreeAccessor,GagawaNodeTreeAccessor,TreeAccessorNodeModel,TreeAccessorWithDataNodeModel,TreeAccessorWithDataWorkflowNode,TreeAccessorWorkflowNode,TreeAccessorXItem
public interface ITreeAccessor<Node,Identifier>Interface for treating an item as a node in a tree-like structure. Contains two method for accessing the ID of the item, and the children of the item.- Since:
- 8.4.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterable<? extends Node>getChildren(Node node)Gets the children of the given node.IdentifiergetId(Node node)Gets the ID of the given node.
-
-
-
Method Detail
-
getChildren
Iterable<? extends Node> getChildren(Node node)
Gets the children of the given node. It is generally recommended to return a list of nodes for fast random access, but implementations must be compatible with general iterables.- Parameters:
node- The node for which to get the children.- Returns:
- A list of all children of the given tree node, empty array if it is a leaf node.
-
getId
Identifier getId(Node node)
Gets the ID of the given node. The ID must be unique within the tree, but it is not required to be unique across different trees.- Parameters:
node- A node for which to retrieve its ID.- Returns:
- The (unique) identifier of the given tree node.
-
-