org.semanticweb.HermiT.hierarchy
Class Hierarchy<E>
java.lang.Object
org.semanticweb.HermiT.hierarchy.Hierarchy<E>
public class Hierarchy<E>
- extends Object
Method Summary |
static
|
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()
|
|
transform(Hierarchy.Transformer<? super E,T> transformer,
Comparator<T> comparator)
|
void |
traverseDepthFirst(Hierarchy.HierarchyNodeVisitor<E> visitor)
|
protected void |
traverseDepthFirst(Hierarchy.HierarchyNodeVisitor<E> visitor,
int level,
HierarchyNode<E> node,
HierarchyNode<E> parentNode,
Set<HierarchyNode<E>> visited,
HierarchyNode<E>[] redirectBuffer)
|
static
|
trivialHierarchy(T topElement,
T bottomElement)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_topNode
protected final HierarchyNode<E> m_topNode
m_bottomNode
protected final HierarchyNode<E> m_bottomNode
m_nodesByElements
protected final Map<E,HierarchyNode<E>> m_nodesByElements
Hierarchy
public Hierarchy(HierarchyNode<E> topNode,
HierarchyNode<E> bottomNode)
getTopNode
public HierarchyNode<E> getTopNode()
getBottomNode
public HierarchyNode<E> getBottomNode()
isEmpty
public boolean isEmpty()
getNodeForElement
public HierarchyNode<E> getNodeForElement(E element)
getAllNodes
public Collection<HierarchyNode<E>> getAllNodes()
getAllNodesSet
public Set<HierarchyNode<E>> getAllNodesSet()
getAllElements
public Set<E> getAllElements()
getDepth
public int getDepth()
transform
public <T> Hierarchy<T> transform(Hierarchy.Transformer<? super E,T> transformer,
Comparator<T> comparator)
traverseDepthFirst
public void traverseDepthFirst(Hierarchy.HierarchyNodeVisitor<E> visitor)
traverseDepthFirst
protected void traverseDepthFirst(Hierarchy.HierarchyNodeVisitor<E> visitor,
int level,
HierarchyNode<E> node,
HierarchyNode<E> parentNode,
Set<HierarchyNode<E>> visited,
HierarchyNode<E>[] redirectBuffer)
emptyHierarchy
public static <T> Hierarchy<T> emptyHierarchy(Collection<T> elements,
T topElement,
T bottomElement)
trivialHierarchy
public static <T> Hierarchy<T> trivialHierarchy(T topElement,
T bottomElement)
Copyright © 2012. All Rights Reserved.