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.- Status:
- Stable ICU 63.
-
Nested Class Summary
Nested classes/interfaces inherited from class CodePointTrie
CodePointTrie.Fast, CodePointTrie.Fast16, CodePointTrie.Fast32, CodePointTrie.Fast8, CodePointTrie.Small, CodePointTrie.Small16, CodePointTrie.Small32, CodePointTrie.Small8, CodePointTrie.Type, CodePointTrie.ValueWidthModifier and TypeClassDescriptionstatic classA CodePointTrie withCodePointTrie.Type.FAST.static final classA CodePointTrie withCodePointTrie.Type.FASTandCodePointTrie.ValueWidth.BITS_16.static final classA CodePointTrie withCodePointTrie.Type.FASTandCodePointTrie.ValueWidth.BITS_32.static final classA CodePointTrie withCodePointTrie.Type.FASTandCodePointTrie.ValueWidth.BITS_8.static classA CodePointTrie withCodePointTrie.Type.SMALL.static final classA CodePointTrie withCodePointTrie.Type.SMALLandCodePointTrie.ValueWidth.BITS_16.static final classA CodePointTrie withCodePointTrie.Type.SMALLandCodePointTrie.ValueWidth.BITS_32.static final classA CodePointTrie withCodePointTrie.Type.SMALLandCodePointTrie.ValueWidth.BITS_8.static enumSelectors for the type of a CodePointTrie.static enumSelectors for the number of bits in a CodePointTrie data value.Nested classes/interfaces inherited from class CodePointMap
CodePointMap.Range, CodePointMap.RangeOption, CodePointMap.StringIterator, CodePointMap.ValueFilterModifier and TypeClassDescriptionstatic final classRange iteration result data.static enumSelectors for how getRange() should report value ranges overlapping with surrogates.classIterates over code points of a string and fetches map values.static interfaceCallback function interface: Modifies a map value. -
Field Summary
Fields inherited from class CodePointTrie
data, dataLength, highStartModifier and TypeFieldDescriptionprotected final com.ibm.icu.util.CodePointTrie.DataDeprecated.This API is ICU internal only.protected final intDeprecated.This API is ICU internal only.protected final intDeprecated.This API is ICU internal only. -
Method Summary
Modifier and TypeMethodDescriptionfinal intbmpGet(int c) Returns a trie value for a BMP code point (U+0000..U+FFFF), without range checking.static CodePointTrie.Fast16fromBinary(ByteBuffer bytes) Creates a trie from its binary form.final intget(int c) Returns the value for a code point as stored in the map, with range checking.final intsuppGet(int c) Returns a trie value for a supplementary code point (U+10000..U+10FFFF), without range checking.Methods inherited from class CodePointTrie.Fast
cpIndex, fromBinary, getType, stringIteratorModifier and TypeMethodDescriptionprotected final intcpIndex(int c) Deprecated.This API is ICU internal only.static CodePointTrie.FastfromBinary(CodePointTrie.ValueWidth valueWidth, ByteBuffer bytes) Creates a trie from its binary form.final CodePointTrie.TypegetType()Returns the trie type.stringIterator(CharSequence s, int sIndex) Returns an iterator (not a java.util.Iterator) over code points of a string for fetching map values.Methods inherited from class CodePointTrie
asciiGet, fastIndex, fromBinary, getRange, getValueWidth, smallIndex, toBinaryModifier and TypeMethodDescriptionfinal intasciiGet(int c) Returns a trie value for an ASCII code point, without range checking.protected final intfastIndex(int c) Deprecated.This API is ICU internal only.static CodePointTriefromBinary(CodePointTrie.Type type, CodePointTrie.ValueWidth valueWidth, ByteBuffer bytes) Creates a trie from its binary form, stored in the ByteBuffer starting at the current position.final booleangetRange(int start, CodePointMap.ValueFilter filter, CodePointMap.Range range) Sets the range object to a range of code points beginning with the start parameter.final CodePointTrie.ValueWidthReturns the number of bits in a trie data value.protected final intsmallIndex(CodePointTrie.Type type, int c) Deprecated.This API is ICU internal only.final inttoBinary(OutputStream os) Writes a representation of the trie to the output stream.Methods inherited from class CodePointMap
getRange, iteratorModifier and TypeMethodDescriptionbooleangetRange(int start, CodePointMap.RangeOption option, int surrogateValue, CodePointMap.ValueFilter filter, CodePointMap.Range range) Sets the range object to a range of code points beginning with the start parameter.iterator()Convenience iterator over same-map-value code point ranges.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
fromBinary
Creates a trie from its binary form. Same asCodePointTrie.fromBinary(Type, ValueWidth, ByteBuffer)withCodePointTrie.Type.FASTandCodePointTrie.ValueWidth.BITS_16.- Parameters:
bytes- a buffer containing the binary data of a CodePointTrie- Returns:
- the trie
- Status:
- Stable ICU 63.
-
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:
getin 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
- Status:
- Stable ICU 63.
-
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:
bmpGetin classCodePointTrie.Fast- Parameters:
c- the input code point, must be U+0000..U+FFFF- Returns:
- The BMP code point's trie value.
- Status:
- Stable ICU 63.
-
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:
suppGetin classCodePointTrie.Fast- Parameters:
c- the input code point, must be U+10000..U+10FFFF- Returns:
- The supplementary code point's trie value.
- Status:
- Stable ICU 63.
-