CharTermAttributeImpl
Default implementation of CharTermAttribute.
Inheritors
Properties
Functions
Appends the specified String to this character sequence.
Appends the specified StringBuilder to this character sequence.
Appends the contents of the other CharTermAttribute to this character sequence.
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.
In most cases the clone is, and should be, deep in order to be able to properly capture the state of all attributes.
Returns the Unicode code point at the specified index of this CharSequence.
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.
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.
This method returns the current attribute values as a string in the following format by calling the .reflectWith method:
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
Grows the termBuffer to at least size newSize, preserving the existing content.
Sets the length of the termBuffer to zero. Use this method before appending contents using the Appendable interface.
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.
Returns solely the term text as specified by the CharSequence interface.