Package org.jcsp.net
Class ApplicationID
java.lang.Object
org.jcsp.net.AbstractID
org.jcsp.net.ApplicationID
- All Implemented Interfaces:
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
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the suppliedObject
with thisApplicationID
.Returns the parentNodeID
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.toString()
Returns aString
representation of this object.
-
Field Details
-
nodeID
-
appID
private int appID
-
-
Constructor Details
-
ApplicationID
ApplicationID(NodeID nodeID, int appID)
-
-
Method Details
-
toString
Returns a
String
representation of this object. The current implemenation returns a human readableString
which shows the application's homeNodeID
and the integer application id. -
equals
Compares the supplied
Object
with thisApplicationID
. -
hashCode
public int hashCode()Returns a hash code for this Object. Two equal
ApplicationID
objects return the same hash code. -
onSameBranch
Description copied from class:AbstractID
This tests whether another ID is on the same branch of a hierachy. Returns true if either the supplied object is a child (or a child of child etc.) of this object or if the supplied object is a parent (or a parent of a parent etc.) of this object.- Specified by:
onSameBranch
in classAbstractID
- Returns:
- a
boolean
indicating whether or not the supplied object is on the same branch.
-
getParentID
Returns the parentNodeID
of this object.- Specified by:
getParentID
in classAbstractID
- Returns:
- the parent
NodeID
.
-