public final class DomainID extends AbstractID implements java.io.Serializable, java.lang.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.
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
DomainStringFormPrefix |
private java.lang.String |
name |
private boolean |
nullDom |
private static java.lang.String |
NullDomainStringForm |
Constructor and Description |
---|
DomainID()
Constructor which constructs an ID for the Null Domain.
|
DomainID(java.lang.String name)
Public constructor for a
DomainID which takes
the name of the domain as a parameter. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Compares this object with another object and returns whether
the supplied object is equals, smaller or larger.
|
(package private) static DomainID |
createFromStringForm(java.lang.String str)
Deprecated.
not needed now channel names abstracted
|
boolean |
equals(java.lang.Object o)
This compares an object with this object.
|
java.lang.String |
getDomainName()
Public accessor for the Domain name.
|
(package private) static DomainID |
getNullDomainID() |
AbstractID |
getParentID()
Returns the identifier representing this domain's parent
domain.
|
(package private) java.lang.String |
getStringForm()
Deprecated.
not needed now channel names abstracted
|
int |
hashCode()
Returns an
int hash code for the current object. |
(package private) boolean |
isNullDomain() |
(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 human readable
String showing this domain
name and any parent domains. |
private boolean nullDom
private java.lang.String name
private static final java.lang.String NullDomainStringForm
private static final java.lang.String DomainStringFormPrefix
DomainID()
public DomainID(java.lang.String name)
DomainID
which takes
the name of the domain as a parameter.name
- The name of the domain.static DomainID createFromStringForm(java.lang.String str) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- an object to compare with this object.true
iff the supplied object is a non-null DomainID
which represents the same Domain.public int hashCode()
Returns an int
hash code for the current object.
This obeys the standard hash code rules.
hashCode
in class java.lang.Object
int
hash code.public int compareTo(java.lang.Object o)
Compares this object with another object and returns whether the supplied object is equals, smaller or larger.
compareTo
in interface java.lang.Comparable
o
- The object to compare with this object.boolean onSameBranch(AbstractID abstractID)
AbstractID
onSameBranch
in class AbstractID
boolean
indicating whether or not
the supplied object is on the same branch.boolean isNullDomain()
static DomainID getNullDomainID()
public java.lang.String getDomainName()
Public accessor for the Domain name.
Returns "" if this represents the Null Domain.
String
.public java.lang.String toString()
Returns a human readable String
showing this domain
name and any parent domains.
toString
in class java.lang.Object
String
.java.lang.String getStringForm()
public AbstractID getParentID()
Returns the identifier representing this domain's parent domain.
At present this always returns the global domain's ID.
getParentID
in class AbstractID
AbstractID
.