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.
- Author:
- Quickstone Technologies Limited
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Compares this object with another object and returns whether the supplied object is equals, smaller or larger.boolean
This compares an object with this object.Public accessor for the Domain name.Returns the identifier representing this domain's parent domain.int
hashCode()
Returns anint
hash code for the current object.toString()
Returns a human readableString
showing this domain name and any parent domains.
-
Constructor Details
-
DomainID
Public constructor for aDomainID
which takes the name of the domain as a parameter.- Parameters:
name
- The name of the domain.
-
-
Method Details
-
equals
This compares an object with this object. -
hashCode
public int hashCode()Returns an
int
hash 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:
compareTo
in 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.
-
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
String
showing this domain name and any parent domains. -
getParentID
Returns the identifier representing this domain's parent domain.
At present this always returns the global domain's ID.
- Specified by:
getParentID
in classAbstractID
- Returns:
- the parent
AbstractID
.
-