Class CodePointTrie.Fast
java.lang.Object
com.ibm.icu.util.CodePointMap
com.ibm.icu.util.CodePointTrie
com.ibm.icu.util.CodePointTrie.Fast
- All Implemented Interfaces:
Iterable<CodePointMap.Range>
- Direct Known Subclasses:
CodePointTrie.Fast16, CodePointTrie.Fast32, CodePointTrie.Fast8
- Enclosing class:
CodePointTrie
A CodePointTrie with
CodePointTrie.Type.FAST.- 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 TypeMethodDescriptionabstract intbmpGet(int c) Returns a trie value for a BMP code point (U+0000..U+FFFF), without range checking.protected 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.abstract intsuppGet(int c) Returns a trie value for a supplementary code point (U+10000..U+10FFFF), without range checking.Methods inherited from class CodePointTrie
asciiGet, fastIndex, fromBinary, get, 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.intget(int c) Returns the value for a code point as stored in the map, with range checking.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.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 widthbytes- a buffer containing the binary data of a CodePointTrie- Returns:
- the trie
- Status:
- Stable ICU 63.
-
getType
Description copied from class:CodePointTrieReturns the trie type.- Specified by:
getTypein classCodePointTrie- Returns:
CodePointTrie.Type.FAST- Status:
- Stable ICU 63.
-
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.
- Status:
- Stable ICU 63.
-
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.
- Status:
- Stable ICU 63.
-
cpIndex
Deprecated.This API is ICU internal only.- Specified by:
cpIndexin classCodePointTrie- Status:
- Internal. This API is ICU internal only.
-
stringIterator
Returns an iterator (not a java.util.Iterator) over code points of a string for fetching map values.- Overrides:
stringIteratorin classCodePointMap- Parameters:
s- string to iterate oversIndex- string index where the iteration will start- Returns:
- the iterator
- Status:
- Stable ICU 63.
-