Package org.jgraph.graph
Class ConnectionSet.Connection
- java.lang.Object
-
- org.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
-
-
Constructor Summary
Constructors Constructor Description Connection()
Connection(java.lang.Object edge, java.lang.Object port, boolean isSource)
Constructs a new source or target connection betweenedge
andport
based on the value ofsource
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 equals().boolean
isSource()
Returnstrue
ifport
is the source ofedge
.void
setEdge(java.lang.Object object)
void
setPort(java.lang.Object object)
void
setSource(boolean b)
-
-
-
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()
Returnstrue
ifport
is the source ofedge
.
-
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, ifc1.edge == c2.edge && c1.isSource == c2.isSource.
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Ensure equality of hashCode wrt equals().- Overrides:
hashCode
in classjava.lang.Object
-
setEdge
public void setEdge(java.lang.Object object)
- Parameters:
object
-
-
setSource
public void setSource(boolean b)
- Parameters:
b
-
-
setPort
public void setPort(java.lang.Object object)
- Parameters:
object
-
-
-