Package com.ibm.icu.util
Class CodePointTrie.Fast32
- java.lang.Object
-
- com.ibm.icu.util.CodePointMap
-
- com.ibm.icu.util.CodePointTrie
-
- com.ibm.icu.util.CodePointTrie.Fast
-
- com.ibm.icu.util.CodePointTrie.Fast32
-
- All Implemented Interfaces:
java.lang.Iterable<CodePointMap.Range>
- Enclosing class:
- CodePointTrie
public static final class CodePointTrie.Fast32 extends CodePointTrie.Fast
A CodePointTrie withCodePointTrie.Type.FAST
andCodePointTrie.ValueWidth.BITS_32
.
-
-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bmpGet(int c)
Returns a trie value for a BMP code point (U+0000..U+FFFF), without range checking.static CodePointTrie.Fast32
fromBinary(java.nio.ByteBuffer bytes)
Creates a trie from its binary form.int
get(int c)
Returns the value for a code point as stored in the map, with range checking.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
-
-
-
-
Method Detail
-
fromBinary
public static CodePointTrie.Fast32 fromBinary(java.nio.ByteBuffer bytes)
Creates a trie from its binary form. Same asCodePointTrie.fromBinary(Type, ValueWidth, ByteBuffer)
withCodePointTrie.Type.FAST
andCodePointTrie.ValueWidth.BITS_32
.- 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.
-
-