public static final class Normalizer2Impl.ReorderingBuffer extends Object implements Appendable
If dest is a StringBuilder, then the buffer writes directly to it. Otherwise, the buffer maintains a StringBuilder for intermediate text segments until no further changes are necessary and whole segments are appended. append() methods that take combining-class values always write to the StringBuilder. Other append() methods flush and append to the Appendable.
| Constructor and Description |
|---|
ReorderingBuffer(Normalizer2Impl ni,
Appendable dest,
int destCapacity) |
| Modifier and Type | Method and Description |
|---|---|
Normalizer2Impl.ReorderingBuffer |
append(char c)
Appends the specified character.
|
Normalizer2Impl.ReorderingBuffer |
append(CharSequence s)
Appends the character sequence
csq. |
Normalizer2Impl.ReorderingBuffer |
append(CharSequence s,
int start,
int limit)
Appends a subsequence of
csq. |
void |
append(CharSequence s,
int start,
int limit,
int leadCC,
int trailCC) |
void |
append(int c,
int cc) |
void |
appendZeroCC(int c) |
boolean |
equals(CharSequence s,
int start,
int limit) |
void |
flush()
Flushes from the intermediate StringBuilder to the Appendable,
if they are different objects.
|
Normalizer2Impl.ReorderingBuffer |
flushAndAppendZeroCC(CharSequence s,
int start,
int limit)
Flushes from the intermediate StringBuilder to the Appendable,
if they are different objects.
|
int |
getLastCC() |
StringBuilder |
getStringBuilder() |
boolean |
isEmpty() |
int |
length() |
void |
remove() |
void |
removeSuffix(int suffixLength) |
void |
setLastChar(char c) |
public ReorderingBuffer(Normalizer2Impl ni, Appendable dest, int destCapacity)
public boolean isEmpty()
public int length()
public int getLastCC()
public StringBuilder getStringBuilder()
public boolean equals(CharSequence s, int start, int limit)
public void setLastChar(char c)
public void append(int c,
int cc)
public void append(CharSequence s, int start, int limit, int leadCC, int trailCC)
public Normalizer2Impl.ReorderingBuffer append(char c)
Appendableappend in interface Appendablec - the character to append.Appendable.public void appendZeroCC(int c)
public Normalizer2Impl.ReorderingBuffer append(CharSequence s)
Appendablecsq. Implementation classes may
not append the whole sequence, for example if the target is a buffer with
limited size.
If csq is null, the characters "null" are appended.
append in interface Appendables - the character sequence to append.Appendable.public Normalizer2Impl.ReorderingBuffer append(CharSequence s, int start, int limit)
Appendablecsq.
If csq is not null then calling this method is equivalent
to calling append(csq.subSequence(start, end)).
If csq is null, the characters "null" are appended.
append in interface Appendables - the character sequence to append.start - the first index of the subsequence of csq that is
appended.limit - the last index of the subsequence of csq that is
appended.Appendable.public void flush()
public Normalizer2Impl.ReorderingBuffer flushAndAppendZeroCC(CharSequence s, int start, int limit)
public void remove()
public void removeSuffix(int suffixLength)