Class CodePointTrie.Fast

All Implemented Interfaces:
Iterable<CodePointMap.Range>
Direct Known Subclasses:
CodePointTrie.Fast16, CodePointTrie.Fast32, CodePointTrie.Fast8
Enclosing class:
CodePointTrie

public abstract static class CodePointTrie.Fast extends CodePointTrie
A CodePointTrie with CodePointTrie.Type.FAST.
  • Method Details

    • fromBinary

      public static CodePointTrie.Fast fromBinary(CodePointTrie.ValueWidth valueWidth, ByteBuffer bytes)
      Creates a trie from its binary form. Same as CodePointTrie.fromBinary(Type, ValueWidth, ByteBuffer) with CodePointTrie.Type.FAST.
      Parameters:
      valueWidth - selects the number of bits in a data value; this method throws an exception if the valueWidth does not match the binary data; use null to accept any data value width
      bytes - a buffer containing the binary data of a CodePointTrie
      Returns:
      the trie
    • getType

      public final CodePointTrie.Type getType()
      Description copied from class: CodePointTrie
      Returns the trie type.
      Specified by:
      getType in class CodePointTrie
      Returns:
      CodePointTrie.Type.FAST
    • bmpGet

      public abstract int bmpGet(int c)
      Returns a trie value for a BMP code point (U+0000..U+FFFF), without range checking. Can be used to look up a value for a UTF-16 code unit if other parts of the string processing check for surrogates.
      Parameters:
      c - the input code point, must be U+0000..U+FFFF
      Returns:
      The BMP code point's trie value.
    • suppGet

      public abstract int suppGet(int c)
      Returns a trie value for a supplementary code point (U+10000..U+10FFFF), without range checking.
      Parameters:
      c - the input code point, must be U+10000..U+10FFFF
      Returns:
      The supplementary code point's trie value.
    • cpIndex

      @Deprecated protected final int cpIndex(int c)
      Deprecated.
      This API is ICU internal only.
      Specified by:
      cpIndex in class CodePointTrie
    • stringIterator

      public final CodePointMap.StringIterator stringIterator(CharSequence s, int sIndex)
      Returns an iterator (not a java.util.Iterator) over code points of a string for fetching map values.
      Overrides:
      stringIterator in class CodePointMap
      Parameters:
      s - string to iterate over
      sIndex - string index where the iteration will start
      Returns:
      the iterator