java.lang.Object
org.evrete.util.Hierarchy<T>
- Type Parameters:
T- the type of the value stored in the hierarchy nodes
The Hierarchy class represents a hierarchical structure of elements.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Hierarchy
Constructs a Hierarchy with a specified value and an optional parent.- Parameters:
value- the value of the current nodeparent- the parent node, can be null
-
Hierarchy
Constructs a Hierarchy root node.- Parameters:
value- the value of the current node
-
-
Method Details
-
getValue
Returns the value of the current node.- Returns:
- the value of the current node
-
walkUp
Walks up the hierarchy, starting from the current node and applying the given consumer to each node's value.- Parameters:
consumer- a Consumer to apply to each node's value
-