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 betweenedgeandportbased on the value ofsource -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo 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.inthashCode()Ensure equality of hashCode wrt equals().booleanisSource()Returnstrueifportis the source ofedge.voidvoidvoidsetSource(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 ifportis the source ofedge.
-
-
Constructor Details
-
Connection
public Connection() -
Connection
Constructs a new source or target connection betweenedgeandportbased on the value ofsource
-
-
Method Details
-
getEdge
Returns the edge of the connection. -
getPort
Returns the port of the connection. -
isSource
public boolean isSource()Returnstrueifportis 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 && 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-
-