Class HTMLStripCharFilter.TextSegment
java.lang.Object
org.apache.lucene.analysis.util.OpenStringBuilder
org.apache.lucene.analysis.charfilter.HTMLStripCharFilter.TextSegment
- All Implemented Interfaces:
Appendable
,CharSequence
- Enclosing class:
- HTMLStripCharFilter
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
The position from which the next char will be read.Fields inherited from class org.apache.lucene.analysis.util.OpenStringBuilder
buf, len
-
Constructor Summary
ConstructorsConstructorDescriptionTextSegment
(char[] buffer, int length) Wraps the given buffer and sets this.len to the given length.TextSegment
(int size) Allocates an internal buffer of the given size. -
Method Summary
Modifier and TypeMethodDescription(package private) void
clear()
Sets len = 0 and pos = 0.(package private) boolean
isRead()
Returns true when all characters in the text segment have been read(package private) int
nextChar()
Returns the next char in the segment.(package private) void
restart()
Sets pos = 0Methods inherited from class org.apache.lucene.analysis.util.OpenStringBuilder
append, append, append, capacity, charAt, flush, getArray, length, reserve, reset, resize, set, setCharAt, setLength, size, subSequence, toCharArray, toString, unsafeWrite, unsafeWrite, unsafeWrite, write, write, write, write, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
pos
int posThe position from which the next char will be read.
-
-
Constructor Details
-
TextSegment
TextSegment(char[] buffer, int length) Wraps the given buffer and sets this.len to the given length. -
TextSegment
TextSegment(int size) Allocates an internal buffer of the given size.
-
-
Method Details
-
clear
void clear()Sets len = 0 and pos = 0. -
restart
void restart()Sets pos = 0 -
nextChar
int nextChar()Returns the next char in the segment. -
isRead
boolean isRead()Returns true when all characters in the text segment have been read
-