com.sun.electric.tool.ncc.basic
Class TransitiveRelation<T>
java.lang.Object
com.sun.electric.tool.ncc.basic.TransitiveRelation<T>
public class TransitiveRelation<T>
- extends java.lang.Object
The TransitiveRelation object is given pairs of objects
that are related. Relationship is presumed to be transitive.
The TransitiveRelation object can then return maximal sets of
related objects.
For example, if Tom is related to Sally, John is related to Tom,
and Fred is related to Paul then TransitiveRelation returns
{Tom, Sally, John} and {Fred, Paul}.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransitiveRelation
public TransitiveRelation()
theseAreRelated
public void theseAreRelated(T o1,
T o2)
getSetsOfRelatives
public java.util.Iterator<java.util.Set<T>> getSetsOfRelatives()
- Return an Iterator over Sets of related Objects.