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

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

public class TokenGroupAttributeImpl
extends org.apache.lucene.util.AttributeImpl
implements TokenGroupAttribute

Implementation of TokenGroupAttribute.

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

See Also:
Serialized Form

Constructor Summary
TokenGroupAttributeImpl()
           
 
Method Summary
 void clear()
           
 void copyTo(org.apache.lucene.util.AttributeImpl obj)
           
 boolean equals(Object obj)
           
 TokenGroupStream getTokenGroupStream()
          Returns a TokenGroupStream, which provides access to individual tokens in this group.
 int hashCode()
           
 boolean isEmpty()
          Returns true if this is an empty group.
 void setAttributeSource(org.apache.lucene.util.AttributeSource source)
           
 void setStates(List<org.apache.lucene.util.AttributeSource.State> states)
           
 int size()
          Returns the size of this TokenGroup.
 
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

TokenGroupAttributeImpl

public TokenGroupAttributeImpl()
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

isEmpty

public boolean isEmpty()
Description copied from interface: TokenGroupAttribute
Returns true if this is an empty group.

Specified by:
isEmpty in interface TokenGroupAttribute
Returns:
true if this is an empty group.

size

public int size()
Description copied from interface: TokenGroupAttribute
Returns the size of this TokenGroup.

Specified by:
size in interface TokenGroupAttribute
Returns:
size of this TokenGroup

setStates

public void setStates(List<org.apache.lucene.util.AttributeSource.State> states)

setAttributeSource

public void setAttributeSource(org.apache.lucene.util.AttributeSource source)

getTokenGroupStream

public TokenGroupStream getTokenGroupStream()
Description copied from interface: TokenGroupAttribute
Returns a TokenGroupStream, which provides access to individual tokens in this group. Use TokenGroupStream.incrementToken() to iterate over the member Tokens in this group, and AttributeSource.getAttribute(Class) to obtain the attribute(s) of each token.

Specified by:
getTokenGroupStream in interface TokenGroupAttribute
Returns:
TokenGroupStream to access to the members of this group.