Package org.jcsp.net
Class DomainID
java.lang.Object
org.jcsp.net.AbstractID
org.jcsp.net.DomainID
- All Implemented Interfaces:
Serializable,Comparable
A Class whose instances represent a unique identifier for a JCSP.NET domain.
See AbstractID for a further explanation of domains and the use
of this class.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares this object with another object and returns whether the supplied object is equals, smaller or larger.(package private) static DomainIDDeprecated.not needed now channel names abstractedbooleanThis compares an object with this object.Public accessor for the Domain name.(package private) static DomainIDReturns the identifier representing this domain's parent domain.(package private) StringDeprecated.not needed now channel names abstractedinthashCode()Returns aninthash code for the current object.(package private) boolean(package private) booleanonSameBranch(AbstractID abstractID) This tests whether another ID is on the same branch of a hierachy.toString()Returns a human readableStringshowing this domain name and any parent domains.
-
Field Details
-
nullDom
private boolean nullDom -
name
-
NullDomainStringForm
- See Also:
-
DomainStringFormPrefix
- See Also:
-
-
Constructor Details
-
DomainID
DomainID()Constructor which constructs an ID for the Null Domain. -
DomainID
Public constructor for aDomainIDwhich takes the name of the domain as a parameter.- Parameters:
name- The name of the domain.
-
-
Method Details
-
createFromStringForm
Deprecated.not needed now channel names abstracted- Throws:
IllegalArgumentException
-
equals
This compares an object with this object. -
hashCode
public int hashCode()Returns an
inthash code for the current object.This obeys the standard hash code rules.
-
compareTo
Compares this object with another object and returns whether the supplied object is equals, smaller or larger.
- Specified by:
compareToin interfaceComparable- Parameters:
o- The object to compare with this object.- Returns:
- 0 if the supplied object is equal, a negative integer if the supplied object is smaller or a positive integer if the other object is larger.
-
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.
-
isNullDomain
boolean isNullDomain() -
getNullDomainID
-
getDomainName
Public accessor for the Domain name.
Returns "" if this represents the Null Domain.
- Returns:
- the domain name as a
String.
-
toString
Returns a human readable
Stringshowing this domain name and any parent domains. -
getStringForm
String getStringForm()Deprecated.not needed now channel names abstracted -
getParentID
Returns the identifier representing this domain's parent domain.
At present this always returns the global domain's ID.
- Specified by:
getParentIDin classAbstractID- Returns:
- the parent
AbstractID.
-