public abstract class AbstractSemanticIdentifier extends java.lang.Object implements SemanticIdentifier
AbstractSemanticIdentifier
class implements the basic
methods that are needed for a SemanticIdentifier
to provide
a good speed improvement. In particular, it makes use of the getIdentifier
method to use the identifier in the hashCode and equals fuctions in order
to make them fast.Modifier | Constructor and Description |
---|---|
protected |
AbstractSemanticIdentifier()
Creates a new instance of AbstractSemanticIdentifier
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SemanticIdentifier o) |
boolean |
equals(java.lang.Object other)
Determines if this identifier is equal to another Object.
|
boolean |
equals(SemanticIdentifier other)
Determines if this identifier is equal to the given one by comparing
the identifier number only.
|
int |
hashCode()
Computes the hash-code for the SemanticIdentifier, which should be
equal to a call to getIdentifier.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getIdentifier, getLabel
protected AbstractSemanticIdentifier()
public int hashCode()
hashCode
in interface SemanticIdentifier
hashCode
in class java.lang.Object
public int compareTo(SemanticIdentifier o)
compareTo
in interface SemanticIdentifier
compareTo
in interface java.lang.Comparable<SemanticIdentifier>
o
- public boolean equals(java.lang.Object other)
equals
in interface SemanticIdentifier
equals
in class java.lang.Object
other
- The Object to test equality with.public boolean equals(SemanticIdentifier other)
equals
in interface SemanticIdentifier
other
- The other SemanticIdentifier to compare to.