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.SerializableObject 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 betweenedgeandportbased on the value ofsource
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Two connections are equal if they represent the source or target of the same edge.java.lang.ObjectgetEdge()Returns the edge of the connection.java.lang.ObjectgetPort()Returns the port of the connection.inthashCode()Ensure equality of hashCode wrt equals().booleanisSource()Returnstrueifportis the source ofedge.voidsetEdge(java.lang.Object object)voidsetPort(java.lang.Object object)voidsetSource(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()
Returnstrueifportis 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Ensure equality of hashCode wrt equals().- Overrides:
hashCodein 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-
-
-