Example usage for Java org.apache.lucene.analysis TokenStream fields, constructors, methods, implement or subclass
The text is from its open source code.
AttributeFactory | DEFAULT_TOKEN_ATTRIBUTE_FACTORY Default AttributeFactory instance that should be used for TokenStreams. |
TokenStream() A TokenStream using the default attribute factory. |
T | addAttribute(Class The caller must pass in a Class<? |
State | captureState() Captures the state of all Attributes. |
void | clearAttributes() Resets all Attributes in this AttributeSource by calling AttributeImpl#clear() on each Attribute implementation. |
AttributeSource | cloneAttributes() Performs a clone of all AttributeImpl instances returned in a new AttributeSource instance. |
void | close() Releases resources associated with this stream. |
void | end() This method is called by the consumer after the last token has been consumed, after #incrementToken() returned false (using the new TokenStream API). |
T | getAttribute(Class Returns the instance of the passed in Attribute contained in this AttributeSource The caller must pass in a Class<? |
Iterator | getAttributeClassesIterator() Returns a new iterator that iterates the attribute classes in the same order they were added in. |
AttributeFactory | getAttributeFactory() returns the used AttributeFactory. |
Iterator | getAttributeImplsIterator() Returns a new iterator that iterates all unique Attribute implementations. |
boolean | hasAttribute(Class extends Attribute> attClass) The caller must pass in a Class<? |
boolean | hasAttributes() Returns true, iff this AttributeSource has any attributes |
boolean | incrementToken() Consumers (i.e., IndexWriter ) use this method to advance the stream to the next token. |
String | reflectAsString(final boolean prependAttClass) This method returns the current attribute values as a string in the following format by calling the #reflectWith(AttributeReflector) method:
|
void | reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this AttributeSource holds to the given AttributeReflector . |
void | reset() This method is called by a consumer before it begins consumption using #incrementToken() . |
String | toString() Returns a string consisting of the class's simple name, the hex representation of the identity hash code, and the current reflection of all attributes. |