com.ebasetech.ufs.utility
Class RelativeNodePath
java.lang.Object
com.ebasetech.ufs.utility.RelativeNodePath
- public class RelativeNodePath
- extends java.lang.Object
routine for finding route between two "nodes" on a tree.
Can work on any node that implements Child. (ie only needs to get parents),
Steps up both branches looking for a common ancestor.
Then calculates a path between them.
The common ancestor can be either top down or bottom up, using the equals method.
you decide.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RelativeNodePath
public RelativeNodePath()
getRelative
public static java.util.List getRelative(Child from,
Child to)
getAncestors
private static final java.util.List getAncestors(Child node)