Class ConnectionSet.Connection

java.lang.Object
org.jgraph.graph.ConnectionSet.Connection
All Implemented Interfaces:
Serializable
Enclosing class:
ConnectionSet

public static class ConnectionSet.Connection extends Object implements Serializable
Object that represents the connection between an edge and a port.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Object
    The edge that will be connected to the port.
    protected boolean
    Indicates if port is the source of edge.
    protected Object
    The port that will be connected to the edge.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Connection(Object edge, Object port, boolean isSource)
    Constructs a new source or target connection between edge and port based on the value of source
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Two connections are equal if they represent the source or target of the same edge.
    Returns the edge of the connection.
    Returns the port of the connection.
    int
    Ensure equality of hashCode wrt equals().
    boolean
    Returns true if port is the source of edge.
    void
    setEdge(Object object)
     
    void
    setPort(Object object)
     
    void
    setSource(boolean b)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • edge

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

      protected Object port
      The port that will be connected to the edge.
    • isSource

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

    • Connection

      public Connection()
    • Connection

      public Connection(Object edge, Object port, boolean isSource)
      Constructs a new source or target connection between edge and port based on the value of source
  • Method Details

    • getEdge

      public Object getEdge()
      Returns the edge of the connection.
    • getPort

      public 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(Object obj)
      Two connections are equal if they represent the source or target of the same edge. That is, if

      c1.edge == c2.edge invalid input: '&'invalid input: '&' c1.isSource == c2.isSource.

      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Ensure equality of hashCode wrt equals().
      Overrides:
      hashCode in class Object
    • setEdge

      public void setEdge(Object object)
      Parameters:
      object -
    • setSource

      public void setSource(boolean b)
      Parameters:
      b -
    • setPort

      public void setPort(Object object)
      Parameters:
      object -