Package com.ibm.icu.util
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:
java.lang.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 withCodePointTrie.Type.FAST
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
CodePointTrie.Fast.FastStringIterator
-
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
CP_PER_INDEX_2_ENTRY, data, dataLength, FAST_DATA_BLOCK_LENGTH, FAST_SHIFT, highStart, INDEX_2_BLOCK_LENGTH, INDEX_2_MASK, INDEX_3_BLOCK_LENGTH, NO_DATA_NULL_OFFSET, NO_INDEX3_NULL_OFFSET, SHIFT_1_2, SHIFT_2_3, SHIFT_3, SMALL_DATA_BLOCK_LENGTH, SMALL_DATA_MASK, SMALL_LIMIT
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Fast(char[] index, CodePointTrie.Data data, int highStart, int index3NullOffset, int dataNullOffset)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract int
bmpGet(int c)
Returns a trie value for a BMP code point (U+0000..U+FFFF), without range checking.protected int
cpIndex(int c)
Deprecated.This API is ICU internal only.static CodePointTrie.Fast
fromBinary(CodePointTrie.ValueWidth valueWidth, java.nio.ByteBuffer bytes)
Creates a trie from its binary form.CodePointTrie.Type
getType()
Returns the trie type.CodePointMap.StringIterator
stringIterator(java.lang.CharSequence s, int sIndex)
Returns an iterator (not a java.util.Iterator) over code points of a string for fetching map values.abstract 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
asciiGet, fastIndex, fromBinary, get, getRange, getValueWidth, smallIndex, toBinary
-
Methods inherited from class com.ibm.icu.util.CodePointMap
getRange, iterator
-
-
-
-
Constructor Detail
-
Fast
private Fast(char[] index, CodePointTrie.Data data, int highStart, int index3NullOffset, int dataNullOffset)
-
-
Method Detail
-
fromBinary
public static CodePointTrie.Fast fromBinary(CodePointTrie.ValueWidth valueWidth, java.nio.ByteBuffer bytes)
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
-
getType
public final CodePointTrie.Type getType()
Description copied from class:CodePointTrie
Returns the trie type.- Specified by:
getType
in classCodePointTrie
- 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 classCodePointTrie
-
stringIterator
public final CodePointMap.StringIterator stringIterator(java.lang.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 classCodePointMap
- Parameters:
s
- string to iterate oversIndex
- string index where the iteration will start- Returns:
- the iterator
-
-