Class GlobalID
java.lang.Object
org.jcsp.net.AbstractID
org.jcsp.net.GlobalID
- All Implemented Interfaces:
Serializable
A Class whose instances represent the global domain. There is only ever a need to have one instance of this class per JVM so a static instance is supplied.
The GlobalID object is the parent
AbstractID to all top level DomainID objects.
See for a fully explanation of
this class.
AbstractID
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares another object with thisGlobalIDobject.Returnsnullas there is no parentAbstractIDof instances of this class.inthashCode()Returns aninthash code for this object.(package private) booleanonSameBranch(AbstractID abstractID) This tests whether another ID is on the same branch of a hierachy.toString()Returns a human readable string representation of aGlobalID.
-
Field Details
-
instance
A static instance of
GlobalID. Instead of creatingGlobalIDobjects, it is better to use this instance as only once instance is ever required.
-
-
Constructor Details
-
GlobalID
public GlobalID()
-
-
Method Details
-
getParentID
Returns
nullas there is no parentAbstractIDof instances of this class.- Specified by:
getParentIDin classAbstractID- Returns:
null.
-
equals
-
hashCode
-
toString
-
onSameBranch
Description copied from class:AbstractIDThis 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:
onSameBranchin classAbstractID- Returns:
- a
booleanindicating whether or not the supplied object is on the same branch.
-