gov.sandia.cognition.framework
Class DefaultSemanticIdentifier

java.lang.Object
  extended by gov.sandia.cognition.framework.AbstractSemanticIdentifier
      extended by gov.sandia.cognition.framework.DefaultSemanticIdentifier
All Implemented Interfaces:
SemanticIdentifier, Serializable, Comparable<SemanticIdentifier>

public class DefaultSemanticIdentifier
extends AbstractSemanticIdentifier

The DefaultSemanticIdentifier class implements a default version of the SemanticIdentifier interface that stores the SemanticLabel the identifier is for and the unique identifier integer. Only implementations of SemanticIdentifierMap should instantiate a DefaultSemanticIdentifier directly. All other uses should access a SemanticIdentifier through a SemanticIdentifierMap.

Since:
1.0
Author:
Justin Basilico
See Also:
Serialized Form

Constructor Summary
DefaultSemanticIdentifier(SemanticLabel label, int identifier)
          Creates a new instance of SemanticIdentifier.
 
Method Summary
 int getIdentifier()
          Gets the integer identifier for the SemanticLabel
 SemanticLabel getLabel()
          Gets the SemanticLabel.
 
Methods inherited from class gov.sandia.cognition.framework.AbstractSemanticIdentifier
compareTo, equals, equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSemanticIdentifier

public DefaultSemanticIdentifier(SemanticLabel label,
                                 int identifier)
Creates a new instance of SemanticIdentifier.

Parameters:
label - The SemanticLabel that is identified
identifier - The identifier for the label
Method Detail

getLabel

public SemanticLabel getLabel()
Gets the SemanticLabel.

Returns:
The SemanticLabel

getIdentifier

public int getIdentifier()
Gets the integer identifier for the SemanticLabel

Returns:
The unique identifier for the label