Java org.apache.lucene.analysis TokenStream fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.analysis TokenStream fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.analysis TokenStream.

The text is from its open source code.

Subclass

org.apache.lucene.analysis.TokenStream has subclasses.
Click this link to see all its subclasses.

Field

AttributeFactoryDEFAULT_TOKEN_ATTRIBUTE_FACTORY
Default AttributeFactory instance that should be used for TokenStreams.

Constructor

TokenStream()
A TokenStream using the default attribute factory.

Method

TaddAttribute(Class attClass)
The caller must pass in a Class<?
StatecaptureState()
Captures the state of all Attributes.
voidclearAttributes()
Resets all Attributes in this AttributeSource by calling AttributeImpl#clear() on each Attribute implementation.
AttributeSourcecloneAttributes()
Performs a clone of all AttributeImpl instances returned in a new AttributeSource instance.
voidclose()
Releases resources associated with this stream.
voidend()
This method is called by the consumer after the last token has been consumed, after #incrementToken() returned false (using the new TokenStream API).
TgetAttribute(Class attClass)
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.
AttributeFactorygetAttributeFactory()
returns the used AttributeFactory.
IteratorgetAttributeImplsIterator()
Returns a new iterator that iterates all unique Attribute implementations.
booleanhasAttribute(Class attClass)
The caller must pass in a Class<?
booleanhasAttributes()
Returns true, iff this AttributeSource has any attributes
booleanincrementToken()
Consumers (i.e., IndexWriter ) use this method to advance the stream to the next token.
StringreflectAsString(final boolean prependAttClass)
This method returns the current attribute values as a string in the following format by calling the #reflectWith(AttributeReflector) method:
  • iff prependAttClass=true : "AttributeClass#key=value,AttributeClass#key=value"
  • iff prependAttClass=false : "key=value,key=value"
voidreflectWith(AttributeReflector reflector)
This method is for introspection of attributes, it should simply add the key/values this AttributeSource holds to the given AttributeReflector .
voidreset()
This method is called by a consumer before it begins consumption using #incrementToken() .
StringtoString()
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.