com.ebasetech.ufs.utility
Class RelativeNodePath

java.lang.Object
  extended bycom.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.


Constructor Summary
RelativeNodePath()
           
 
Method Summary
private static java.util.List getAncestors(Child node)
           
static java.util.List getRelative(Child from, Child to)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelativeNodePath

public RelativeNodePath()
Method Detail

getRelative

public static java.util.List getRelative(Child from,
                                         Child to)

getAncestors

private static final java.util.List getAncestors(Child node)