Class 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
    • Field Summary

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

      Constructors 
      Constructor Description
      Connection()  
      Connection​(java.lang.Object edge, java.lang.Object port, boolean isSource)
      Constructs a new source or target connection between edge and port based on the value of source
    • 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()
      Returns true if port is the source of edge.
      void setEdge​(java.lang.Object object)  
      void setPort​(java.lang.Object object)  
      void setSource​(boolean b)  
      • Methods inherited from class java.lang.Object

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

      • edge

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

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

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

      • Connection

        public Connection()
      • Connection

        public Connection​(java.lang.Object edge,
                          java.lang.Object port,
                          boolean isSource)
        Constructs a new source or target connection between edge and port based on the value of source
    • 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()
        Returns true if port is the source of edge.
      • 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, if

        c1.edge == c2.edge && c1.isSource == c2.isSource.

        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Ensure equality of hashCode wrt equals().
        Overrides:
        hashCode in class java.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 -