public class BusDescriptor extends Object
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 a valid bus ID. Every edge of ID null
forms a group of its own.
Also, every object except null
can be used as a 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.
BusRouter.EDGE_DESCRIPTOR_DPKEY
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Indicates whether or not some other object is "equal to" this one.
|
Object |
getBusId()
Gets the bus ID.
|
Object |
getSourceGroupId()
Gets the group ID for the source side of the edge.
|
Object |
getTargetGroupId()
Gets the group ID for the target side of the edge.
|
int |
hashCode()
Returns a hash code value for this
BusDescriptor instance. |
boolean |
isFixed()
Gets whether or not the associated edge is fixed.
|
void |
setBusId(Object value)
Sets the bus ID.
|
void |
setFixed(boolean value)
Sets whether or not the associated edge is fixed.
|
void |
setSourceGroupId(Object value)
Sets the group ID for the source side of the edge.
|
void |
setTargetGroupId(Object value)
Sets the group ID for the target side of the edge.
|
String |
toString()
Returns a string representation consisting of the bus ID, the fixed flag, and both group IDs.
|
public BusDescriptor(Object busID)
BusDescriptor
for the specified bus ID which is marked as not fixed and uses the
default edge group IDs.busID
- the ID of the bus to which the associated edge belongspublic BusDescriptor(Object busID, boolean fixed)
BusDescriptor
for the specified parameters and default group IDs.busID
- the ID of the bus to which the associated edge belongsfixed
- true
if associated edge is fixed, false
otherwisepublic BusDescriptor(Object busID, boolean fixed, Object sourceGroupID, Object targetGroupID)
BusDescriptor
for the specified parameters.busID
- the ID of the bus to which the associated edge belongsfixed
- true
if associated edge is fixed, false
otherwisesourceGroupID
- the group ID of the source sidetargetGroupID
- the group ID of the target sidepublic BusDescriptor(Object busID, Object sourceGroupID, Object targetGroupID)
BusDescriptor
for the specified parameters and marks it as not fixed.busID
- the ID of the bus to which the associated edge belongssourceGroupID
- the group ID of the source sidetargetGroupID
- the group ID of the target sidepublic boolean equals(Object obj)
public Object getBusId()
Edges associated with descriptor instances
having the same bus ID belong to a common bus. Every
edge associated with ID null
forms a group of its own.
setBusId(Object)
public Object getSourceGroupId()
Edges incident to the same node v
but associated with different group IDs at this endpoint, use separate bus
connections at v
.
null
is set, a default group ID is used. Therefore, all associated edges
ending at the same node belong to the same group.Object
. All associated edges ending at the same node belong to the same group (unless otherwise specified in the
constructor).setSourceGroupId(Object)
public Object getTargetGroupId()
Edges incident to the same node v
but associated with different group IDs at this endpoint, use separate bus
connections at v
.
null
is set, a default group ID is used. Therefore, all associated edges
ending at the same node belong to the same group.Object
. All associated edges ending at the same node belong to the same group (unless otherwise specified in the
constructor).setTargetGroupId(Object)
public int hashCode()
BusDescriptor
instance.public boolean isFixed()
The algorithm doesn't change the route of fixed edges but tries to prevent overlaps with non-fixed edges.
false
. The associated edge is not fixed (unless otherwise specified in the constructor).true
if the associated edge is fixed, false
otherwisesetFixed(boolean)
public void setBusId(Object value)
Edges associated with descriptor instances
having the same bus ID belong to a common bus. Every
edge associated with ID null
forms a group of its own.
value
- the bus IDgetBusId()
public void setFixed(boolean value)
The algorithm doesn't change the route of fixed edges but tries to prevent overlaps with non-fixed edges.
false
. The associated edge is not fixed (unless otherwise specified in the constructor).value
- true
if the associated edge is fixed, false
otherwiseisFixed()
public void setSourceGroupId(Object value)
Edges incident to the same node v
but associated with different group IDs at this endpoint, use separate bus
connections at v
.
null
is set, a default group ID is used. Therefore, all associated edges
ending at the same node belong to the same group.Object
. All associated edges ending at the same node belong to the same group (unless otherwise specified in the
constructor).value
- the group ID for the source sidegetSourceGroupId()
public void setTargetGroupId(Object value)
Edges incident to the same node v
but associated with different group IDs at this endpoint, use separate bus
connections at v
.
null
is set, a default group ID is used. Therefore, all associated edges
ending at the same node belong to the same group.Object
. All associated edges ending at the same node belong to the same group (unless otherwise specified in the
constructor).value
- the group ID for the target sidegetTargetGroupId()