Package org.jgraph.graph
Class ConnectionSet.Connection
java.lang.Object
org.jgraph.graph.ConnectionSet.Connection
- All Implemented Interfaces:
Serializable
- Enclosing class:
ConnectionSet
Object that represents the connection between an edge and a port.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConnection
(Object edge, Object port, boolean isSource) Constructs a new source or target connection betweenedge
andport
based on the value ofsource
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Two connections are equal if they represent the source or target of the same edge.getEdge()
Returns the edge of the connection.getPort()
Returns the port of the connection.int
hashCode()
Ensure equality of hashCode wrt equals().boolean
isSource()
Returnstrue
ifport
is the source ofedge
.void
void
void
setSource
(boolean b)
-
Field Details
-
edge
The edge that will be connected to the port. -
port
The port that will be connected to the edge. -
isSource
protected boolean isSourceIndicates ifport
is the source ofedge
.
-
-
Constructor Details
-
Connection
public Connection() -
Connection
Constructs a new source or target connection betweenedge
andport
based on the value ofsource
-
-
Method Details
-
getEdge
Returns the edge of the connection. -
getPort
Returns the port of the connection. -
isSource
public boolean isSource()Returnstrue
ifport
is the source ofedge
. -
equals
Two connections are equal if they represent the source or target of the same edge. That is, ifc1.edge == c2.edge invalid input: '&'invalid input: '&' c1.isSource == c2.isSource.
-
hashCode
public int hashCode()Ensure equality of hashCode wrt equals(). -
setEdge
- Parameters:
object
-
-
setSource
public void setSource(boolean b) - Parameters:
b
-
-
setPort
- Parameters:
object
-
-