public class ApplicationID extends AbstractID implements java.io.Serializable
A Class whose instances represent a unique identifier for a JCSP.NET application. An application is defined as being a process network that forms a complete program. Applications have a parent Node which is the Node on which the application was started.
For a full explanation, see
.
AbstractID
Modifier and Type | Field and Description |
---|---|
private int |
appID |
private NodeID |
nodeID |
Constructor and Description |
---|
ApplicationID(NodeID nodeID,
int appID) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares the supplied
Object with this
ApplicationID . |
AbstractID |
getParentID()
Returns the parent
NodeID of this
object. |
int |
hashCode()
Returns a hash code for this Object.
|
(package private) boolean |
onSameBranch(AbstractID abstractID)
This tests whether another ID is on the same branch of a
hierachy.
|
java.lang.String |
toString()
Returns a
String representation of this object. |
private NodeID nodeID
private int appID
ApplicationID(NodeID nodeID, int appID)
public java.lang.String toString()
Returns a String
representation of this object.
The current implemenation returns a human readable
String
which shows the application's home
NodeID
and the integer application id.
toString
in class java.lang.Object
String
representing this Application ID.public boolean equals(java.lang.Object o)
Compares the supplied Object
with this
ApplicationID
.
equals
in class java.lang.Object
o
- another Object
to compare with
this ApplicationID
.true
iff the parameter o is an
ApplicationID
that represents the
same application as this object.public int hashCode()
Returns a hash code for this Object. Two equal
ApplicationID
objects return the same hash code.
hashCode
in class java.lang.Object
int
hash code.boolean onSameBranch(AbstractID abstractID)
AbstractID
onSameBranch
in class AbstractID
boolean
indicating whether or not
the supplied object is on the same branch.public AbstractID getParentID()
NodeID
of this
object.getParentID
in class AbstractID
NodeID
.