Package com.ibm.icu.util
Class CodePointTrie.Fast16
java.lang.Object
com.ibm.icu.util.CodePointMap
com.ibm.icu.util.CodePointTrie
com.ibm.icu.util.CodePointTrie.Fast
com.ibm.icu.util.CodePointTrie.Fast16
- All Implemented Interfaces:
Iterable<CodePointMap.Range>
- Enclosing class:
CodePointTrie
A CodePointTrie with
CodePointTrie.Type.FAST
and CodePointTrie.ValueWidth.BITS_16
.-
Nested Class Summary
Nested classes/interfaces inherited from class com.ibm.icu.util.CodePointTrie
CodePointTrie.Fast, CodePointTrie.Fast16, CodePointTrie.Fast32, CodePointTrie.Fast8, CodePointTrie.Small, CodePointTrie.Small16, CodePointTrie.Small32, CodePointTrie.Small8, CodePointTrie.Type, CodePointTrie.ValueWidth
Nested classes/interfaces inherited from class com.ibm.icu.util.CodePointMap
CodePointMap.Range, CodePointMap.RangeOption, CodePointMap.StringIterator, CodePointMap.ValueFilter
-
Field Summary
Fields inherited from class com.ibm.icu.util.CodePointTrie
data, dataLength, highStart
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
bmpGet
(int c) Returns a trie value for a BMP code point (U+0000..U+FFFF), without range checking.static CodePointTrie.Fast16
fromBinary
(ByteBuffer bytes) Creates a trie from its binary form.final int
get
(int c) Returns the value for a code point as stored in the map, with range checking.final int
suppGet
(int c) Returns a trie value for a supplementary code point (U+10000..U+10FFFF), without range checking.Methods inherited from class com.ibm.icu.util.CodePointTrie.Fast
cpIndex, fromBinary, getType, stringIterator
Methods inherited from class com.ibm.icu.util.CodePointTrie
asciiGet, fastIndex, fromBinary, getRange, getValueWidth, smallIndex, toBinary
Methods inherited from class com.ibm.icu.util.CodePointMap
getRange, iterator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
fromBinary
Creates a trie from its binary form. Same asCodePointTrie.fromBinary(Type, ValueWidth, ByteBuffer)
withCodePointTrie.Type.FAST
andCodePointTrie.ValueWidth.BITS_16
.- Parameters:
bytes
- a buffer containing the binary data of a CodePointTrie- Returns:
- the trie
-
get
public final int get(int c) Returns the value for a code point as stored in the map, with range checking. Returns an implementation-defined error value if c is not in the range 0..U+10FFFF.- Overrides:
get
in classCodePointTrie
- Parameters:
c
- the code point- Returns:
- the map value, or an implementation-defined error value if the code point is not in the range 0..U+10FFFF
-
bmpGet
public final 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.- Specified by:
bmpGet
in classCodePointTrie.Fast
- Parameters:
c
- the input code point, must be U+0000..U+FFFF- Returns:
- The BMP code point's trie value.
-
suppGet
public final int suppGet(int c) Returns a trie value for a supplementary code point (U+10000..U+10FFFF), without range checking.- Specified by:
suppGet
in classCodePointTrie.Fast
- Parameters:
c
- the input code point, must be U+10000..U+10FFFF- Returns:
- The supplementary code point's trie value.
-