Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val bytesRef: BytesRef

Retrieve this attribute's BytesRef. The bytes are updated from the current term. The implementation may return a new instance or keep the previous one.

Link copied to clipboard
open override val length: Int
Link copied to clipboard
open override var positionLength: Int

Set the position length of this Token.

Link copied to clipboard
open override var termFrequency: Int

Set the custom term frequency of the current term within one document.

Functions

Link copied to clipboard
open override fun append(c: Char): CharTermAttribute
open override fun append(csq: CharSequence?): CharTermAttribute
open override fun append(csq: CharSequence?, start: Int, end: Int): CharTermAttribute

open override fun append(s: String): CharTermAttribute

Appends the specified String to this character sequence.

open override fun append(s: StringBuilder): CharTermAttribute

Appends the specified StringBuilder to this character sequence.

Appends the contents of the other CharTermAttribute to this character sequence.

Link copied to clipboard
open override fun buffer(): CharArray

Returns the internal termBuffer character array which you can then directly alter. If the array is too small for your token, use .resizeBuffer to increase it. After altering the buffer be sure to call .setLength to record the number of valid characters that were placed into the termBuffer.

Link copied to clipboard
open override fun clear()

Resets the attributes

Link copied to clipboard
open override fun clone(): PackedTokenAttributeImpl

In most cases the clone is, and should be, deep in order to be able to properly capture the state of all attributes.

Link copied to clipboard

Returns the Unicode code point at the specified index of this CharSequence.

Link copied to clipboard

Returns a stream of code point values from this sequence. Any surrogate pairs encountered in the sequence are combined as if by {@linkplain Character#toCodePoint Character.toCodePoint} and the result is passed to the stream. Any other code units, including ordinary BMP characters, unpaired surrogates, and undefined code units, are zero-extended to {@code int} values which are then passed to the stream.

Link copied to clipboard
open override fun copyBuffer(buffer: CharArray, offset: Int, length: Int)

Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.

Link copied to clipboard
open override fun copyTo(target: AttributeImpl)

Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Link copied to clipboard
open override fun end()

Resets the attributes at end

Link copied to clipboard
open override fun endOffset(): Int

{@inheritDoc}

Link copied to clipboard
open operator override fun equals(obj: Any?): Boolean
Link copied to clipboard
open operator override fun get(index: Int): Char
Link copied to clipboard
open override fun getPositionIncrement(): Int

{@inheritDoc}

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun reflectAsString(prependAttClass: Boolean): String

This method returns the current attribute values as a string in the following format by calling the .reflectWith method:

Link copied to clipboard
open override fun reflectWith(reflector: AttributeReflector)

This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

Link copied to clipboard
open override fun resizeBuffer(newSize: Int): CharArray

Grows the termBuffer to at least size newSize, preserving the existing content.

Link copied to clipboard
open override fun setEmpty(): CharTermAttribute?

Sets the length of the termBuffer to zero. Use this method before appending contents using the Appendable interface.

Link copied to clipboard
open override fun setLength(length: Int): CharTermAttribute

Set number of valid characters (length of the term) in the termBuffer array. Use this to truncate the termBuffer or to synchronize with external manipulation of the termBuffer. Note: to grow the size of the array, use .resizeBuffer first.

Link copied to clipboard
open override fun setOffset(startOffset: Int, endOffset: Int)

{@inheritDoc}

Link copied to clipboard
open override fun setPositionIncrement(positionIncrement: Int)

{@inheritDoc}

Link copied to clipboard
open override fun setType(type: String)

{@inheritDoc}

Link copied to clipboard
open override fun startOffset(): Int

{@inheritDoc}

Link copied to clipboard
open override fun subSequence(start: Int, end: Int): CharSequence
Link copied to clipboard
open override fun toString(): String

Returns solely the term text as specified by the CharSequence interface.

Link copied to clipboard
open override fun type(): String

{@inheritDoc}