Search this API

y.layout.router
Class BusDescriptor

java.lang.Object
  extended by y.layout.router.BusDescriptor

public class BusDescriptor
extends Object

A descriptor for bus-related information to be associated with an edge. It consists of a bus ID defining the bus of the associated edge, two optional edge group IDs for specifying the edge grouping at the source and target side, respectively, and an optional boolean flag to mark the edge as fixed.

Every object except null can be used as valid bus ID. Every edge of ID null forms a group of its own. Also, every object except null can be used as valid edge group ID. If there is no group ID defined for an edge or if null is set, a default group ID is used. Therefore, all such edges ending at the same node belong to the same group.


Constructor Summary
BusDescriptor(Object busID)
          Creates a new instance of BusDescriptor for the specified bus ID which is marked as not fixed and uses the default edge group IDs.
BusDescriptor(Object busID, boolean fixed)
          Creates a new instance of BusDescriptor for the specified parameters and default group IDs.
BusDescriptor(Object busID, boolean fixed, Object sourceGroupID, Object targetGroupID)
          Creates a new instance of BusDescriptor for the specified parameters.
BusDescriptor(Object busID, Object sourceGroupID, Object targetGroupID)
          Creates a new instance of BusDescriptor for the specified parameters and marks it as not fixed.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 Object getID()
          Returns the bus ID.
 Object getSourceGroupID()
          Returns the group ID for the source side of the edge.
 Object getTargetGroupID()
          Returns the group ID for the target side of the edge.
 int hashCode()
           
 boolean isFixed()
          Returns whether the associated edge is fixed or not.
 void setFixed(boolean fixed)
          Sets whether the associated edge is fixed or not.
 void setID(Object busID)
          Sets the bus ID.
 void setSourceGroupID(Object sourceGroupID)
          Sets the new group ID for the source side of the edge.
 void setTargetGroupID(Object targetGroupID)
          Sets the new group ID for the target side of the edge.
 String toString()
          Returns a string consisting of the bus ID, the fixed flag, and both group IDs.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BusDescriptor

public BusDescriptor(Object busID)
Creates a new instance of BusDescriptor for the specified bus ID which is marked as not fixed and uses the default edge group IDs.

Parameters:
busID - the ID of the bus the associated edge belongs to

BusDescriptor

public BusDescriptor(Object busID,
                     Object sourceGroupID,
                     Object targetGroupID)
Creates a new instance of BusDescriptor for the specified parameters and marks it as not fixed.

Parameters:
busID - the ID of the bus the associated edge belongs to
sourceGroupID - the group ID of the source side
targetGroupID - the group ID of the target side

BusDescriptor

public BusDescriptor(Object busID,
                     boolean fixed)
Creates a new instance of BusDescriptor for the specified parameters and default group IDs.

Parameters:
busID - the ID of the bus the associated edge belongs to
fixed - whether the associated edge is fixed or not

BusDescriptor

public BusDescriptor(Object busID,
                     boolean fixed,
                     Object sourceGroupID,
                     Object targetGroupID)
Creates a new instance of BusDescriptor for the specified parameters.

Parameters:
busID - the ID of the bus the associated edge belongs to
fixed - whether the associated edge is fixed or not
sourceGroupID - the group ID of the source side
targetGroupID - the group ID of the target side
Method Detail

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if all corresponding parameters are equal; false otherwise.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getID

public Object getID()
Returns the bus ID.

Returns:
the bus ID

setID

public void setID(Object busID)
Sets the bus ID.

Parameters:
busID - the bus ID

getSourceGroupID

public Object getSourceGroupID()
Returns the group ID for the source side of the edge.

Returns:
the group ID for the source side

setSourceGroupID

public void setSourceGroupID(Object sourceGroupID)
Sets the new group ID for the source side of the edge.

Parameters:
sourceGroupID - the group ID to set

getTargetGroupID

public Object getTargetGroupID()
Returns the group ID for the target side of the edge.

Returns:
the group ID for the target side

setTargetGroupID

public void setTargetGroupID(Object targetGroupID)
Sets the new group ID for the target side of the edge.

Parameters:
targetGroupID - the group ID to set

isFixed

public boolean isFixed()
Returns whether the associated edge is fixed or not.

Returns:
true if the edge is fixed

setFixed

public void setFixed(boolean fixed)
Sets whether the associated edge is fixed or not.

Parameters:
fixed - whether the associated edge is fixed or not

toString

public String toString()
Returns a string consisting of the bus ID, the fixed flag, and both group IDs.

Overrides:
toString in class Object
Returns:
a string consisting of the bus ID, the fixed flag, and both group IDs

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.