Class Normalizer2Impl.ReorderingBuffer
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.impl.Normalizer2Impl.ReorderingBuffer
- All Implemented Interfaces:
Appendable
- Enclosing class:
Normalizer2Impl
Writable buffer that takes care of canonical ordering.
Its Appendable methods behave like the C++ implementation's
appendZeroCC() methods.
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) voidappend(int c, int cc) append(CharSequence s, int start, int limit) voidappend(CharSequence s, int start, int limit, boolean isNFD, int leadCC, int trailCC) voidappendZeroCC(int c) booleanequals(CharSequence s, int start, int limit) voidflush()Flushes from the intermediate StringBuilder to the Appendable, if they are different objects.flushAndAppendZeroCC(CharSequence s, int start, int limit) Flushes from the intermediate StringBuilder to the Appendable, if they are different objects.intbooleanisEmpty()intlength()voidremove()voidremoveSuffix(int suffixLength)
-
Constructor Details
-
ReorderingBuffer
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
length
public int length() -
getLastCC
public int getLastCC() -
getStringBuilder
-
equals
-
append
public void append(int c, int cc) -
append
-
append
- Specified by:
appendin interfaceAppendable
-
appendZeroCC
public void appendZeroCC(int c) -
append
- Specified by:
appendin interfaceAppendable
-
append
- Specified by:
appendin interfaceAppendable
-
flush
public void flush()Flushes from the intermediate StringBuilder to the Appendable, if they are different objects. Used after recomposition. Must be called at the end when writing to a non-StringBuilder Appendable. -
flushAndAppendZeroCC
Flushes from the intermediate StringBuilder to the Appendable, if they are different objects. Then appends the new text to the Appendable or StringBuilder. Normally used after quick check loops find a non-empty sequence. -
remove
public void remove() -
removeSuffix
public void removeSuffix(int suffixLength)
-