util.graph
Class SignalEdge

java.lang.Object
  |
  +--util.graph.Edge
        |
        +--util.graph.SignalEdge
All Implemented Interfaces:
Cloneable, Serializable

public class SignalEdge
extends Edge

SignalEdge stores the source of a given signal when it is ownened. It is also a multiple-owner edge: more than one person can be laying claim to it at a time (as long as they are all content with the single signal on it)

See Also:
Serialized Form

Constructor Summary
SignalEdge(Object from, String outPort, Object to, String inPort)
           
 
Method Summary
 void addOwner(Object owner, int inccost)
          Add owner to the set of owners.
 int cost()
           
 boolean hasOwner(Object owner)
           
 Collection owners()
          Return collection of owners (not original)
 boolean removeOwner(Object owner)
           
 void setSignal(Object si)
           
 Object signal()
           
 
Methods inherited from class util.graph.Edge
equals, from, hashCode, inPort, outPort, owner, setOwner, to, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SignalEdge

public SignalEdge(Object from,
                  String outPort,
                  Object to,
                  String inPort)
Method Detail

owners

public Collection owners()
Return collection of owners (not original)

signal

public Object signal()

setSignal

public void setSignal(Object si)

cost

public int cost()
Overrides:
cost in class Edge

hasOwner

public boolean hasOwner(Object owner)

removeOwner

public boolean removeOwner(Object owner)
Returns:
false if no owner on the edge.

addOwner

public void addOwner(Object owner,
                     int inccost)
Add owner to the set of owners. Add inccost to the current cost.