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, waitgetIdentifier, getLabelprotected AbstractSemanticIdentifier()
public int hashCode()
hashCode in interface SemanticIdentifierhashCode in class java.lang.Objectpublic int compareTo(SemanticIdentifier o)
compareTo in interface SemanticIdentifiercompareTo in interface java.lang.Comparable<SemanticIdentifier>o - public boolean equals(java.lang.Object other)
equals in interface SemanticIdentifierequals in class java.lang.Objectother - The Object to test equality with.public boolean equals(SemanticIdentifier other)
equals in interface SemanticIdentifierother - The other SemanticIdentifier to compare to.