Class CheckConnected

java.lang.Object
  extended byCheckConnected

public class CheckConnected
extends java.lang.Object

Checks if 2 subunits are in the same Assembly


Constructor Summary
CheckConnected()
          Constructs an empty CheckConnected object
 
Method Summary
 java.util.Vector getConnected(Subunit sub)
          Returns Vector containing all the subunits are in the same Assembly with Subunit sub, including sub itself.
 boolean isConnected(Subunit sub1, Subunit sub2)
          Checks if Subunit sub1 and Subunit sub2 are in the same Assembly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckConnected

public CheckConnected()
Constructs an empty CheckConnected object

Method Detail

isConnected

public boolean isConnected(Subunit sub1,
                           Subunit sub2)
Checks if Subunit sub1 and Subunit sub2 are in the same Assembly

Parameters:
sub1 - Subunit
sub2 - Subunit
Returns:
boolean

getConnected

public java.util.Vector getConnected(Subunit sub)
Returns Vector containing all the subunits are in the same Assembly with Subunit sub, including sub itself. Similar to Djikstra algorithm

Parameters:
sub - Subunit
Returns:
Vector of Subunits