|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SemanticIdentifier
The SemanticIdentifier class holds a SemanticLabel along with the unique integer that can be used to identify the SemanticLabel within a model. It is used so that dealing with SemanticLabels can be done really quickly by using an integer rather than using a String or more complex data structure. This is especially important in the hashCode and equals functions. Only developers implementing a new Cognitive Model type would should be concerned with implementing this interface. Developers using a model or developing a module should create SemanticIdentifiers through the model's SemanticIdentifierMap.
Method Summary | |
---|---|
int |
compareTo(SemanticIdentifier o)
|
boolean |
equals(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 |
getIdentifier()
Gets the integer identifier for the SemanticLabel |
SemanticLabel |
getLabel()
Gets the SemanticLabel. |
int |
hashCode()
Computes the hash-code for the SemanticIdentifier, which should be equal to a call to getIdentifier. |
Method Detail |
---|
int hashCode()
hashCode
in class Object
int compareTo(SemanticIdentifier o)
compareTo
in interface Comparable<SemanticIdentifier>
o
-
boolean equals(Object other)
equals
in class Object
other
- The Object to test equality with.
boolean equals(SemanticIdentifier other)
other
- The other SemanticIdentifier to compare to.
SemanticLabel getLabel()
int getIdentifier()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |