jlibs.core.graph
Class Ladder<E>
java.lang.Object
jlibs.core.graph.Ladder<E>
- Direct Known Subclasses:
- Navigator2
public abstract class Ladder<E>
- extends Object
- Author:
- Santhosh Kumar T
|
Method Summary |
|
getAncestor(E elem,
Class<A> clazz)
|
int |
getHeight(E elem)
|
int |
getHeight(E fromElem,
E toElem)
|
|
getParent(E elem,
Class<A> clazz)
|
String |
getPath(E elem,
Convertor<E,String> convertor,
String separator)
|
String |
getRelativePath(E fromElem,
E toElem,
Convertor<E,String> convertor,
String separator)
|
E |
getRoot(E elem)
|
E |
getSharedAncestor(E elem1,
E elem2)
|
boolean |
isAncestor(E elem,
E ancestor)
|
boolean |
isRelated(E elem1,
E elem2)
|
abstract E |
parent(E elem)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Ladder
public Ladder()
parent
public abstract E parent(E elem)
getHeight
public int getHeight(E fromElem,
E toElem)
getHeight
public int getHeight(E elem)
getParent
public <A extends E> A getParent(E elem,
Class<A> clazz)
getAncestor
public <A extends E> A getAncestor(E elem,
Class<A> clazz)
getRoot
public E getRoot(E elem)
getSharedAncestor
public E getSharedAncestor(E elem1,
E elem2)
isAncestor
public boolean isAncestor(E elem,
E ancestor)
isRelated
public boolean isRelated(E elem1,
E elem2)
getPath
public String getPath(E elem,
Convertor<E,String> convertor,
String separator)
getRelativePath
public String getRelativePath(E fromElem,
E toElem,
Convertor<E,String> convertor,
String separator)
Copyright © 2018. All rights reserved.