Package org.jcsp.net

Class ChannelID

java.lang.Object
org.jcsp.net.ChannelID
All Implemented Interfaces:
Serializable

class ChannelID extends Object implements Serializable
  • Field Details

  • Constructor Details

  • Method Details

    • createFromStringForm

      static ChannelID createFromStringForm(String stringForm) throws IllegalArgumentException
      This returns a ChannelID created from its String form as returned by the getStringForm method.
      Parameters:
      stringForm - the String to use to create the ChannelID.
      Returns:
      the recreated ChannelID.
      Throws:
      IllegalArgumentException
    • getStringForm

      String getStringForm()
      This returns a String representation of this ChannelID. The ChannelID can be recreated by calling the createFromString method.
      Returns:
      the String representing this ChannelID.
    • getNodeID

      public final NodeID getNodeID()
      Returns the channel's NodeID.
      Returns:
      the channel's NodeID.
    • getIndex

      public final long getIndex()
      Returns the channel's index number.
      Returns:
      the channel's index number.
    • equals

      public final boolean equals(Object obj)
      Compares two ChannelIDs for equality.
      Overrides:
      equals in class Object
      Parameters:
      obj - Another Object to compare with this Object.
      Returns:
      true iff obj is a non-null ChannelID which represents the same channel.
    • toString

      public String toString()
      Returns a human readable string representation of the current instance of this class.
      Overrides:
      toString in class Object
      Returns:
      a human readable String object.