E - typepublic class Hierarchy<E> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Hierarchy.Transformer<E,T>
Transformer.
|
| Constructor and Description |
|---|
Hierarchy(HierarchyNode<E> topNode,
HierarchyNode<E> bottomNode) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Hierarchy<T> |
emptyHierarchy(Collection<T> elements,
T topElement,
T bottomElement) |
Set<E> |
getAllElements() |
Collection<HierarchyNode<E>> |
getAllNodes() |
Set<HierarchyNode<E>> |
getAllNodesSet() |
HierarchyNode<E> |
getBottomNode() |
int |
getDepth() |
HierarchyNode<E> |
getNodeForElement(E element) |
HierarchyNode<E> |
getTopNode() |
boolean |
isEmpty() |
String |
toString() |
<T> Hierarchy<T> |
transform(Hierarchy.Transformer<? super E,T> transformer,
Comparator<T> comparator) |
void |
traverseDepthFirst(org.semanticweb.HermiT.hierarchy.Hierarchy.HierarchyNodeVisitor<E> visitor) |
static <T> Hierarchy<T> |
trivialHierarchy(T topElement,
T bottomElement) |
public Hierarchy(HierarchyNode<E> topNode, HierarchyNode<E> bottomNode)
topNode - topNodebottomNode - bottomNodepublic HierarchyNode<E> getTopNode()
public HierarchyNode<E> getBottomNode()
public boolean isEmpty()
public HierarchyNode<E> getNodeForElement(E element)
element - elementpublic Collection<HierarchyNode<E>> getAllNodes()
public Set<HierarchyNode<E>> getAllNodesSet()
public int getDepth()
public <T> Hierarchy<T> transform(Hierarchy.Transformer<? super E,T> transformer, Comparator<T> comparator)
T - typetransformer - transformercomparator - comparatorpublic void traverseDepthFirst(org.semanticweb.HermiT.hierarchy.Hierarchy.HierarchyNodeVisitor<E> visitor)
visitor - visitorpublic static <T> Hierarchy<T> emptyHierarchy(Collection<T> elements, T topElement, T bottomElement)
T - typeelements - elementstopElement - topElementbottomElement - bottomElementpublic static <T> Hierarchy<T> trivialHierarchy(T topElement, T bottomElement)
T - typetopElement - topElementbottomElement - bottomElementCopyright © 2018. All rights reserved.