com.jgraph.graph
Class ConnectionSet.Connection

java.lang.Object
  extended bycom.jgraph.graph.ConnectionSet.Connection
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
ConnectionSet

public static class ConnectionSet.Connection
extends java.lang.Object
implements java.io.Serializable

Object that represents the connection between an edge and a port.

See Also:
Serialized Form

Field Summary
protected  java.lang.Object edge
          The edge that will be connected to the port.
protected  boolean isSource
          Indicates if port is the source of edge.
protected  java.lang.Object port
          The port that will be connected to the edge.
 
Constructor Summary
ConnectionSet.Connection(java.lang.Object edge, java.lang.Object port, boolean isSource)
          Constructs a new source or target connection between edge and port based on the value of source
 
Method Summary
 boolean equals(java.lang.Object obj)
          Two connections are equal if they represent the source or target of the same edge.
 java.lang.Object getEdge()
          Returns the edge of the connection.
 java.lang.Object getPort()
          Returns the port of the connection.
 int hashCode()
          Ensure equality of hashCode wrt.
 boolean isSource()
          Returns true if port is the source of edge.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edge

protected java.lang.Object edge
The edge that will be connected to the port.


port

protected java.lang.Object port
The port that will be connected to the edge.


isSource

protected boolean isSource
Indicates if port is the source of edge.

Constructor Detail

ConnectionSet.Connection

public ConnectionSet.Connection(java.lang.Object edge,
                                java.lang.Object port,
                                boolean isSource)
Constructs a new source or target connection between edge and port based on the value of source

Method Detail

getEdge

public java.lang.Object getEdge()
Returns the edge of the connection.


getPort

public java.lang.Object getPort()
Returns the port of the connection.


isSource

public boolean isSource()
Returns true if port is the source of edge.


equals

public boolean equals(java.lang.Object obj)
Two connections are equal if they represent the source or target of the same edge. That is, if

c1.edge == c2.edge && c1.isSource == c2.isSource.


hashCode

public int hashCode()
Ensure equality of hashCode wrt. equals().