Class Normalizer2Impl.ReorderingBuffer

java.lang.Object
org.graalvm.shadowed.com.ibm.icu.impl.Normalizer2Impl.ReorderingBuffer
All Implemented Interfaces:
Appendable
Enclosing class:
Normalizer2Impl

public static final class Normalizer2Impl.ReorderingBuffer extends Object implements Appendable
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 Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
    • length

      public int length()
    • getLastCC

      public int getLastCC()
    • getStringBuilder

      public StringBuilder getStringBuilder()
    • equals

      public boolean equals(CharSequence s, int start, int limit)
    • append

      public void append(int c, int cc)
    • append

      public void append(CharSequence s, int start, int limit, boolean isNFD, int leadCC, int trailCC)
    • append

      public Normalizer2Impl.ReorderingBuffer append(char c)
      Specified by:
      append in interface Appendable
    • appendZeroCC

      public void appendZeroCC(int c)
    • append

      Specified by:
      append in interface Appendable
    • append

      public Normalizer2Impl.ReorderingBuffer append(CharSequence s, int start, int limit)
      Specified by:
      append in interface Appendable
    • 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

      public Normalizer2Impl.ReorderingBuffer flushAndAppendZeroCC(CharSequence s, int start, int limit)
      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)