Package org.jcsp.net
Class ChannelID
java.lang.Object
org.jcsp.net.ChannelID
- All Implemented Interfaces:
Serializable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static ChannelIDcreateFromStringForm(String stringForm) This returns a ChannelID created from its String form as returned by the getStringForm method.final booleanCompares two ChannelIDs for equality.final longgetIndex()Returns the channel's index number.final NodeIDReturns the channel's NodeID.(package private) StringThis returns a String representation of this ChannelID.toString()Returns a human readable string representation of the current instance of this class.
-
Field Details
-
nodeID
-
index
private long index -
STRING_FORM_PREFIX
- See Also:
-
-
Constructor Details
-
ChannelID
Creates a ChannelID for a channel.- Parameters:
nodeID- The host node.index- the channel index.
-
ChannelID
ChannelID(String stringForm) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
createFromStringForm
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
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
Compares two ChannelIDs for equality. -
toString
Returns a human readable string representation of the current instance of this class.
-