| Modifier and Type | Field and Description |
|---|---|
| private int[] | bmpBlockBits
One bit per 64 BMP code points. |
| private boolean[] | latin1Contains
One boolean ('true' or 'false') per Latin-1 character. |
| private final int[] | list
The inversion list of the parent set, for the slower contains() implementation for mixed BMP blocks and for supplementary code points. |
| private int[] | list4kStarts
Inversion list indexes for restricted binary searches in findCodePoint(), from findCodePoint(U+0800, U+1000, U+2000, .., U+F000, U+10000). |
| private final int | |
| private int[] | table7FF
One bit per code point from U+0000..U+07FF. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| private final boolean | |
| private int | Returns: the smallest integer i in the range lo..hi, inclusive, such that c < list[i]a character in a subrange of MIN_VALUE..MAX_VALUE c, int The lowest index to be returned. lo, int The highest index to be returned. hi)Same as UnicodeSet.findCodePoint(int c) except that the binary search is restricted for finding code points in a certain range. |
| private void | |
| private static void | set32x64Bits(int[] table, int start, int limit)
Set bits in a bit rectangle in "vertical" bit organization. |
| public final int | Returns: the limit (exclusive end) of the span NOTE: to reduce the overhead of function call to contains(c), it is manually inlined here. Check for sufficient length for trail unit for each surrogate pair. Handle single surrogates as surrogate code points as usual in ICU.The start index start, UnicodeSet.If not null: Receives the number of code points in the span. outCount)Span the initial substring for which each character c has spanCondition==contains(c). |
| public final int | Returns: The string index which starts the span (i.e. inclusive).Symmetrical with span(). |
| bmpBlockBits | back to summary |
|---|---|
| private int[] bmpBlockBits One bit per 64 BMP code points. The bits are organized vertically; consecutive 64-code point blocks correspond to the same bit position in consecutive table words. With code point parts lead=c{15..12} t1=c{11..6} test bits (lead+16) and lead in bmpBlockBits[t1]. If the upper bit is 0, then the lower bit indicates if contains(c) for all code points in the 64-block. If the upper bit is 1, then the block is mixed and set.contains(c) must be called. Bits for 0..7FF (non-shortest forms) and D800..DFFF are set to the result of contains(FFFD) for faster validity checking at runtime. | |
| latin1Contains | back to summary |
|---|---|
| private boolean[] latin1Contains One boolean ('true' or 'false') per Latin-1 character. | |
| list | back to summary |
|---|---|
| private final int[] list The inversion list of the parent set, for the slower contains() implementation for mixed BMP blocks and for supplementary code points. The list is terminated with list[listLength-1]=0x110000. | |
| list4kStarts | back to summary |
|---|---|
| private int[] list4kStarts Inversion list indexes for restricted binary searches in findCodePoint(), from findCodePoint(U+0800, U+1000, U+2000, .., U+F000, U+10000). U+0800 is the first 3-byte-UTF-8 code point. Code points below U+0800 are always looked up in the bit tables. The last pair of indexes is for finding supplementary code points. | |
| listLength | back to summary |
|---|---|
| private final int listLength | |
| table7FF | back to summary |
|---|---|
| private int[] table7FF One bit per code point from U+0000..U+07FF. The bits are organized vertically; consecutive code points correspond to the same bit positions in consecutive table words. With code point parts lead=c{10..6} trail=c{5..0} it is set.contains(c)==(table7FF[trail] bit lead) Bits for 0..7F (non-shortest forms) are set to the result of contains(FFFD) for faster validity checking at runtime. | |
| BMPSet | back to summary |
|---|---|
| public BMPSet(final int[] parentList, int parentListLength) | |
| contains | back to summary |
|---|---|
| public boolean contains(int c) | |
| containsSlow | back to summary |
|---|---|
| private final boolean containsSlow(int c, int lo, int hi) | |
| findCodePoint | back to summary |
|---|---|
| private int findCodePoint(int c, int lo, int hi) Same as UnicodeSet.findCodePoint(int c) except that the binary search is restricted for finding code
points in a certain range.
For restricting the search for finding in the range start..end, pass in lo=findCodePoint(start) and
hi=findCodePoint(end) with 0<=lo<=hi a character in a subrange of MIN_VALUE..MAX_VALUE
The lowest index to be returned.
The highest index to be returned.
the smallest integer i in the range lo..hi, inclusive, such that c < list[i]
| |
| initBits | back to summary |
|---|---|
| private void initBits() | |
| set32x64Bits | back to summary | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| private static void set32x64Bits(int[] table, int start, int limit) Set bits in a bit rectangle in "vertical" bit organization. start Span the initial substring for which each character c has spanCondition==contains(c). It must be
spanCondition==0 or 1.
The start index
If not null: Receives the number of code points in the span.
the limit (exclusive end) of the span
NOTE: to reduce the overhead of function call to contains(c), it is manually inlined here. Check for
sufficient length for trail unit for each surrogate pair. Handle single surrogates as surrogate code points
as usual in ICU.
Symmetrical with span().
Span the trailing substring for which each character c has spanCondition==contains(c). It must be s.length >=
limit and spanCondition==0 or 1.
The string index which starts the span (i.e. inclusive).
| |||||||||