|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CharTermAttribute
The term text of a Token.
Method Summary | |
---|---|
CharTermAttribute |
append(char c)
|
CharTermAttribute |
append(CharSequence csq)
|
CharTermAttribute |
append(CharSequence csq,
int start,
int end)
|
CharTermAttribute |
append(CharTermAttribute termAtt)
Appends the contents of the other CharTermAttribute to this character sequence. |
CharTermAttribute |
append(String s)
Appends the specified String to this character sequence. |
CharTermAttribute |
append(StringBuilder sb)
Appends the specified StringBuilder to this character sequence. |
char[] |
buffer()
Returns the internal termBuffer character array which you can then directly alter. |
void |
copyBuffer(char[] buffer,
int offset,
int length)
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array. |
char[] |
resizeBuffer(int newSize)
Grows the termBuffer to at least size newSize, preserving the existing content. |
CharTermAttribute |
setEmpty()
Sets the length of the termBuffer to zero. |
CharTermAttribute |
setLength(int length)
Set number of valid characters (length of the term) in the termBuffer array. |
Methods inherited from interface java.lang.CharSequence |
---|
charAt, length, subSequence, toString |
Method Detail |
---|
void copyBuffer(char[] buffer, int offset, int length)
buffer
- the buffer to copyoffset
- the index in the buffer of the first character to copylength
- the number of characters to copychar[] buffer()
resizeBuffer(int)
to increase it. After
altering the buffer be sure to call setLength(int)
to record the number of valid
characters that were placed into the termBuffer.
char[] resizeBuffer(int newSize)
newSize
- minimum size of the new termBuffer
CharTermAttribute setLength(int length)
resizeBuffer(int)
first.
length
- the truncated lengthCharTermAttribute setEmpty()
Appendable
interface.
CharTermAttribute append(CharSequence csq)
append
in interface Appendable
CharTermAttribute append(CharSequence csq, int start, int end)
append
in interface Appendable
CharTermAttribute append(char c)
append
in interface Appendable
CharTermAttribute append(String s)
String
to this character sequence.
The characters of the String
argument are appended, in order, increasing the length of
this sequence by the length of the argument. If argument is null
, then the four
characters "null"
are appended.
CharTermAttribute append(StringBuilder sb)
StringBuilder
to this character sequence.
The characters of the StringBuilder
argument are appended, in order, increasing the length of
this sequence by the length of the argument. If argument is null
, then the four
characters "null"
are appended.
CharTermAttribute append(CharTermAttribute termAtt)
CharTermAttribute
to this character sequence.
The characters of the CharTermAttribute
argument are appended, in order, increasing the length of
this sequence by the length of the argument. If argument is null
, then the four
characters "null"
are appended.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |