class ChannelID
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private long |
index |
private NodeID |
nodeID |
private static java.lang.String |
STRING_FORM_PREFIX |
| Constructor and Description |
|---|
ChannelID(NodeID nodeID,
long index)
Creates a ChannelID for a channel.
|
ChannelID(java.lang.String stringForm) |
| Modifier and Type | Method and Description |
|---|---|
(package private) static ChannelID |
createFromStringForm(java.lang.String stringForm)
This returns a ChannelID created from its String form as returned by
the getStringForm method.
|
boolean |
equals(java.lang.Object obj)
Compares two ChannelIDs for equality.
|
long |
getIndex()
Returns the channel's index number.
|
NodeID |
getNodeID()
Returns the channel's NodeID.
|
(package private) java.lang.String |
getStringForm()
This returns a String representation of this ChannelID.
|
java.lang.String |
toString()
Returns a human readable string representation of the current instance of this class.
|
private NodeID nodeID
private long index
private static final java.lang.String STRING_FORM_PREFIX
public ChannelID(NodeID nodeID, long index)
nodeID - The host node.index - the channel index.ChannelID(java.lang.String stringForm) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionstatic ChannelID createFromStringForm(java.lang.String stringForm) throws java.lang.IllegalArgumentException
stringForm - the String to use to create the ChannelID.java.lang.IllegalArgumentExceptionjava.lang.String getStringForm()
public final NodeID getNodeID()
public final long getIndex()
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Another Object to compare with this Object.ChannelID which represents the
same channel.public java.lang.String toString()
toString in class java.lang.ObjectString object.