com.twitter.common.text.token.attribute
Interface TokenGroupAttribute

All Superinterfaces:
org.apache.lucene.util.Attribute
All Known Implementing Classes:
TokenGroupAttributeImpl

public interface TokenGroupAttribute
extends org.apache.lucene.util.Attribute

Attribute representing a group of tokens.


Method Summary
 TokenGroupStream getTokenGroupStream()
          Returns a TokenGroupStream, which provides access to individual tokens in this group.
 boolean isEmpty()
          Returns true if this is an empty group.
 int size()
          Returns the size of this TokenGroup.
 

Method Detail

isEmpty

boolean isEmpty()
Returns true if this is an empty group.

Returns:
true if this is an empty group.

size

int size()
Returns the size of this TokenGroup.

Returns:
size of this TokenGroup

getTokenGroupStream

TokenGroupStream getTokenGroupStream()
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.

Returns:
TokenGroupStream to access to the members of this group.