com.sun.electric.database.topology
Class Connection

java.lang.Object
  extended by com.sun.electric.database.topology.Connection
Direct Known Subclasses:
HeadConnection, TailConnection

public abstract class Connection
extends java.lang.Object

An abstract class Connection is the link between a PortInst on a NodeInst and an ArcInst. Its subclasses are TailConnection and HeadConnection. A Connection has an methods to get location indicating the endpoint of the ArcInst, to get the PortInst on a NodeInst and to get that ArcInst. It has also methods to get and modify propery bits on this end of the ArcInst. To find the arc(s) associated with a particular port on a node, ask the PortInst for a list of its connections. This class and its subclasses are immutable.


Method Summary
 ArcInst getArc()
          Method to return the ArcInst on this Connection.
abstract  int getEndIndex()
          Method to determine the index of this Connection on its ArcInst.
abstract  EPoint getLocation()
          Method to return the location on this Connection.
abstract  PortInst getPortInst()
          Method to return the PortInst on this Connection.
abstract  boolean isArrowed()
          Method to tell whether this connection is arrowed.
abstract  boolean isExtended()
          Method to tell whether this connection is extended.
abstract  boolean isNegated()
          Method to tell whether this connection is negated.
abstract  void setArrowed(boolean state)
          Method to set whether this connection is arrowed.
abstract  void setExtended(boolean e)
          Method to set whether this connection is extended.
abstract  void setNegated(boolean negated)
          Method to set whether this connection is negated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getArc

public ArcInst getArc()
Method to return the ArcInst on this Connection.

Returns:
the ArcInst on this Connection.

getPortInst

public abstract PortInst getPortInst()
Method to return the PortInst on this Connection.

Returns:
the PortInst on this Connection.

getLocation

public abstract EPoint getLocation()
Method to return the location on this Connection.

Returns:
the location on this Connection.

isArrowed

public abstract boolean isArrowed()
Method to tell whether this connection is arrowed.

Returns:
true if this connection is arrowed.

setArrowed

public abstract void setArrowed(boolean state)
Method to set whether this connection is arrowed.

Parameters:
state - true to set that end of this arc to be arrowed.

isExtended

public abstract boolean isExtended()
Method to tell whether this connection is extended.

Returns:
true if this connection is negated.

setExtended

public abstract void setExtended(boolean e)
Method to set whether this connection is extended.

Parameters:
e - true to set that end of this arc to be extended.

isNegated

public abstract boolean isNegated()
Method to tell whether this connection is negated.

Returns:
true if this connection is negated.

setNegated

public abstract void setNegated(boolean negated)
Method to set whether this connection is negated.

Parameters:
negated - true if this connection is negated.

getEndIndex

public abstract int getEndIndex()
Method to determine the index of this Connection on its ArcInst.

Returns:
HEADEND if this Connection is on the head; TAILEND if this Connection is on the head.