| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private CollationIterator. | |
| private int | |
| protected final CollationData | |
| private boolean | |
| protected static final long | |
| private int | |
| private CollationIterator. | |
| protected final Trie2_32 |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | |
| private final void | appendNumericCEs(int ce32, boolean forward)
Turns a string of digits (bytes 0..9) into a sequence of CEs that will sort in numeric order. |
| private final void | |
| protected abstract void | |
| private final void | |
| pack-priv final void | |
| public final void | |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public final int | |
| protected boolean | Returns: false if surrogate code points U+D800..U+DFFF map to their own implicit primary weights (for UTF-16), or true if they map to CE(U+FFFD) (for UTF-8)
|
| protected abstract void | |
| public final long | |
| protected int | |
| private final int | |
| public final long[] | |
| public final int | |
| protected int | |
| public abstract int | |
| protected char | handleGetTrailSurrogate()
Called when handleNextCE32() returns a LEAD_SURROGATE_TAG for a lead surrogate code unit. |
| protected long | |
| public int | |
| protected static final boolean | |
| private static final boolean | |
| protected static final boolean | |
| protected long | |
| public final long | |
| private final int | nextCE32FromContraction(CollationData d, int contractionCE32, CharSequence trieChars, int trieOffset, int ce32, int c)
|
| private final int | nextCE32FromDiscontiguousContraction(CollationData d, CharsTrie suffixes, int ce32, int lookAhead, int c)
|
| private final long | |
| public abstract int | |
| private final int | |
| public final long | |
| private final long | previousCEUnsafe(int c, UVector32 offsets)
Returns the previous CE when data.isUnsafeBackward(c, isNumeric). |
| public abstract int | |
| protected final void | |
| protected final void | reset(boolean numeric)
Resets the state as well as the numeric setting, and completes the initialization. |
| public abstract void | resetToOffset(int newOffset)
Resets the iterator state and sets the position to the specified offset. |
| pack-priv final void |
| ceBuffer | back to summary |
|---|---|
| private CollationIterator. | |
| cesIndex | back to summary |
|---|---|
| private int cesIndex | |
| data | back to summary |
|---|---|
| protected final CollationData data | |
| isNumeric | back to summary |
|---|---|
| private boolean isNumeric | |
| NO_CP_AND_CE32 | back to summary |
|---|---|
| protected static final long NO_CP_AND_CE32 | |
| numCpFwd | back to summary |
|---|---|
| private int numCpFwd | |
| skipped | back to summary |
|---|---|
| private CollationIterator. | |
| trie | back to summary |
|---|---|
| protected final Trie2_32 trie | |
| CollationIterator | back to summary |
|---|---|
| public CollationIterator(CollationData d) Partially constructs the iterator. In Java, we cache partially constructed iterators and finish their setup when starting to work on text (via reset(boolean) and the setText(numeric, ...) methods of subclasses). This avoids memory allocations for iterators that remain unused. In C++, there is only one constructor, and iterators are stack-allocated as needed. | |
| CollationIterator | back to summary |
|---|---|
| public CollationIterator(CollationData d, boolean numeric) | |
| appendCEsFromCE32 | back to summary |
|---|---|
| protected final void appendCEsFromCE32(CollationData d, int c, int ce32, boolean forward) | |
| appendNumericCEs | back to summary |
|---|---|
| private final void appendNumericCEs(int ce32, boolean forward) Turns a string of digits (bytes 0..9) into a sequence of CEs that will sort in numeric order. Starts from this ce32's digit value and consumes the following/preceding digits. The digits string must not be empty and must not have leading zeros. | |
| appendNumericSegmentCEs | back to summary |
|---|---|
| private final void appendNumericSegmentCEs(CharSequence digits) Turns 1..254 digits into a sequence of CEs. Called by appendNumericCEs() for each segment of at most 254 digits. | |
| backwardNumCodePoints | back to summary |
|---|---|
| protected abstract void backwardNumCodePoints(int num) | |
| backwardNumSkipped | back to summary |
|---|---|
| private final void backwardNumSkipped(int n) | |
| clearCEs | back to summary |
|---|---|
| pack-priv final void clearCEs() | |
| clearCEsIfNoneRemaining | back to summary |
|---|---|
| public final void clearCEsIfNoneRemaining() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| fetchCEs | back to summary |
|---|---|
| public final int fetchCEs() Fetches all CEs.
| |
| forbidSurrogateCodePoints | back to summary |
|---|---|
protected boolean forbidSurrogateCodePoints()
| |
| forwardNumCodePoints | back to summary |
|---|---|
| protected abstract void forwardNumCodePoints(int num) | |
| getCE | back to summary |
|---|---|
| public final long getCE(int i) | |
| getCE32FromBuilderData | back to summary |
|---|---|
| protected int getCE32FromBuilderData(int ce32) | |
| getCE32FromPrefix | back to summary |
|---|---|
| private final int getCE32FromPrefix(CollationData d, int ce32) | |
| getCEs | back to summary |
|---|---|
| public final long[] getCEs() | |
| getCEsLength | back to summary |
|---|---|
| public final int getCEsLength() | |
| getDataCE32 | back to summary |
|---|---|
| protected int getDataCE32(int c) Returns the CE32 from the data trie. Normally the same as data.getCE32(), but overridden in the builder. Call this only when the faster data.getCE32() cannot be used. | |
| getOffset | back to summary |
|---|---|
| public abstract int getOffset() | |
| handleGetTrailSurrogate | back to summary |
|---|---|
| protected char handleGetTrailSurrogate() Called when handleNextCE32() returns a LEAD_SURROGATE_TAG for a lead surrogate code unit. Returns the trail surrogate in that case and advances past it, if a trail surrogate follows the lead surrogate. Otherwise returns any other code unit and does not advance. | |
| handleNextCE32 | back to summary |
|---|---|
| protected long handleNextCE32() Returns the next code point and its local CE32 value. Returns Collation.FALLBACK_CE32 at the end of the text (c<0) or when c's CE32 value is to be looked up in the base data (fallback). The code point is used for fallbacks, context and implicit weights. It is ignored when the returned CE32 is not special (e.g., FFFD_CE32). Returns the code point in bits 63..32 (signed) and the CE32 in bits 31..0. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isLeadSurrogate | back to summary |
|---|---|
| protected static final boolean isLeadSurrogate(int c) | |
| isSurrogate | back to summary |
|---|---|
| private static final boolean isSurrogate(int c) | |
| isTrailSurrogate | back to summary |
|---|---|
| protected static final boolean isTrailSurrogate(int c) | |
| makeCodePointAndCE32Pair | back to summary |
|---|---|
| protected long makeCodePointAndCE32Pair(int c, int ce32) | |
| nextCE | back to summary |
|---|---|
| public final long nextCE() Returns the next collation element. | |
| nextCE32FromContraction | back to summary |
|---|---|
| private final int nextCE32FromContraction(CollationData d, int contractionCE32, CharSequence trieChars, int trieOffset, int ce32, int c) | |
| nextCE32FromDiscontiguousContraction | back to summary |
|---|---|
| private final int nextCE32FromDiscontiguousContraction(CollationData d, CharsTrie suffixes, int ce32, int lookAhead, int c) | |
| nextCEFromCE32 | back to summary |
|---|---|
| private final long nextCEFromCE32(CollationData d, int c, int ce32) | |
| nextCodePoint | back to summary |
|---|---|
| public abstract int nextCodePoint() Returns the next code point (with post-increment). Public for identical-level comparison and for testing. | |
| nextSkippedCodePoint | back to summary |
|---|---|
| private final int nextSkippedCodePoint() | |
| previousCE | back to summary |
|---|---|
| public final long previousCE(UVector32 offsets) Returns the previous collation element. | |
| previousCEUnsafe | back to summary |
|---|---|
| private final long previousCEUnsafe(int c, UVector32 offsets) Returns the previous CE when data.isUnsafeBackward(c, isNumeric). | |
| previousCodePoint | back to summary |
|---|---|
| public abstract int previousCodePoint() Returns the previous code point (with pre-decrement). Public for identical-level comparison and for testing. | |
| reset | back to summary |
|---|---|
| protected final void reset() | |
| reset | back to summary |
|---|---|
| protected final void reset(boolean numeric) Resets the state as well as the numeric setting, and completes the initialization. Only exists in Java where we reset cached CollationIterator instances rather than stack-allocating temporary ones. (See also the constructor comments.) | |
| resetToOffset | back to summary |
|---|---|
| public abstract void resetToOffset(int newOffset) Resets the iterator state and sets the position to the specified offset. Subclasses must implement, and must call the parent class method, or CollationIterator.reset(). | |
| setCurrentCE | back to summary |
|---|---|
| pack-priv final void setCurrentCE(long ce) Overwrites the current CE (the last one returned by nextCE()). | |
| Modifier and Type | Field and Description |
|---|---|
| private long[] | |
| private static final int | INITIAL_CAPACITY
Large enough for CEs of most short strings. |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv long | |
| pack-priv long[] | |
| pack-priv void | |
| pack-priv long |
| buffer | back to summary |
|---|---|
| private long[] buffer | |
| INITIAL_CAPACITY | back to summary |
|---|---|
| private static final int INITIAL_CAPACITY Large enough for CEs of most short strings. | |
| length | back to summary |
|---|---|
| pack-priv int length | |
| CEBuffer | back to summary |
|---|---|
| pack-priv CEBuffer() | |
| append | back to summary |
|---|---|
| pack-priv void append(long ce) | |
| appendUnsafe | back to summary |
|---|---|
| pack-priv void appendUnsafe(long ce) | |
| ensureAppendCapacity | back to summary |
|---|---|
| pack-priv void ensureAppendCapacity(int appCap) | |
| get | back to summary |
|---|---|
| pack-priv long get(int i) | |
| getCEs | back to summary |
|---|---|
| pack-priv long[] getCEs() | |
| incLength | back to summary |
|---|---|
| pack-priv void incLength() | |
| set | back to summary |
|---|---|
| pack-priv long set(int i, long ce) | |
| Modifier and Type | Field and Description |
|---|---|
| private final StringBuilder | |
| private final StringBuilder | |
| private int | |
| private int | |
| private CharsTrie. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| pack-priv void | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void |
| newBuffer | back to summary |
|---|---|
| private final StringBuilder newBuffer | |
| oldBuffer | back to summary |
|---|---|
| private final StringBuilder oldBuffer | |
| pos | back to summary |
|---|---|
| private int pos | |
| skipLengthAtMatch | back to summary |
|---|---|
| private int skipLengthAtMatch | |
| state | back to summary |
|---|---|
| private CharsTrie. | |
| SkippedState | back to summary |
|---|---|
| pack-priv SkippedState() | |
| backwardNumCodePoints | back to summary |
|---|---|
| pack-priv int backwardNumCodePoints(int n) | |
| clear | back to summary |
|---|---|
| pack-priv void clear() | |
| hasNext | back to summary |
|---|---|
| pack-priv boolean hasNext() | |
| incBeyond | back to summary |
|---|---|
| pack-priv void incBeyond() | |
| isEmpty | back to summary |
|---|---|
| pack-priv boolean isEmpty() | |
| next | back to summary |
|---|---|
| pack-priv int next() | |
| recordMatch | back to summary |
|---|---|
| pack-priv void recordMatch() | |
| replaceMatch | back to summary |
|---|---|
| pack-priv void replaceMatch() | |
| resetToTrieState | back to summary |
|---|---|
| pack-priv void resetToTrieState(CharsTrie trie) | |
| saveTrieState | back to summary |
|---|---|
| pack-priv void saveTrieState(CharsTrie trie) | |
| setFirstSkipped | back to summary |
|---|---|
| pack-priv void setFirstSkipped(int c) | |
| skip | back to summary |
|---|---|
| pack-priv void skip(int c) | |