com.twitter.common.text.token.attribute
Class PartOfSpeechAttributeImpl

java.lang.Object
  extended by org.apache.lucene.util.AttributeImpl
      extended by com.twitter.common.text.token.attribute.PartOfSpeechAttributeImpl
All Implemented Interfaces:
PartOfSpeechAttribute, Serializable, Cloneable, org.apache.lucene.util.Attribute

public class PartOfSpeechAttributeImpl
extends org.apache.lucene.util.AttributeImpl
implements PartOfSpeechAttribute

Implementation of PartOfSpeechAttribute interface. The default value of PartOfSpeech is -1.

Note that this class explicitly suppresses the ability for instance to be serialized, inherited via AttributeImpl.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.twitter.common.text.token.attribute.PartOfSpeechAttribute
UNKNOWN
 
Constructor Summary
PartOfSpeechAttributeImpl()
           
 
Method Summary
 void clear()
           
 void copyTo(org.apache.lucene.util.AttributeImpl obj)
           
 boolean equals(Object obj)
           
 int getPOS()
          Return PartOfSpeech (POS) of this token.
 int hashCode()
           
 void setPOS(int newPos)
          Set PartOfSpeech (POS) of this token.
 
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartOfSpeechAttributeImpl

public PartOfSpeechAttributeImpl()
Method Detail

clear

public void clear()
Specified by:
clear in class org.apache.lucene.util.AttributeImpl

copyTo

public void copyTo(org.apache.lucene.util.AttributeImpl obj)
Specified by:
copyTo in class org.apache.lucene.util.AttributeImpl

equals

public boolean equals(Object obj)
Specified by:
equals in class org.apache.lucene.util.AttributeImpl

hashCode

public int hashCode()
Specified by:
hashCode in class org.apache.lucene.util.AttributeImpl

setPOS

public void setPOS(int newPos)
Description copied from interface: PartOfSpeechAttribute
Set PartOfSpeech (POS) of this token.

Specified by:
setPOS in interface PartOfSpeechAttribute
Parameters:
newPos - POS of this token.

getPOS

public int getPOS()
Description copied from interface: PartOfSpeechAttribute
Return PartOfSpeech (POS) of this token.

Specified by:
getPOS in interface PartOfSpeechAttribute
Returns:
POS of this token.