public abstract class CollationIterator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CollationData |
data |
protected static long |
NO_CP_AND_CE32 |
protected Trie2_32 |
trie |
| Constructor and Description |
|---|
CollationIterator(CollationData d)
Partially constructs the iterator.
|
CollationIterator(CollationData d,
boolean numeric) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendCEsFromCE32(CollationData d,
int c,
int ce32,
boolean forward) |
protected abstract void |
backwardNumCodePoints(int num) |
void |
clearCEsIfNoneRemaining() |
boolean |
equals(Object other)
Compares this instance with the specified object and indicates if they
are equal.
|
int |
fetchCEs()
Fetches all CEs.
|
protected boolean |
forbidSurrogateCodePoints() |
protected abstract void |
forwardNumCodePoints(int num) |
long |
getCE(int i) |
protected int |
getCE32FromBuilderData(int ce32) |
long[] |
getCEs() |
int |
getCEsLength() |
protected int |
getDataCE32(int c)
Returns the CE32 from the data trie.
|
abstract int |
getOffset() |
protected char |
handleGetTrailSurrogate()
Called when handleNextCE32() returns a LEAD_SURROGATE_TAG for a lead surrogate code unit.
|
protected long |
handleNextCE32()
Returns the next code point and its local CE32 value.
|
protected static boolean |
isLeadSurrogate(int c) |
protected static boolean |
isTrailSurrogate(int c) |
protected long |
makeCodePointAndCE32Pair(int c,
int ce32) |
long |
nextCE()
Returns the next collation element.
|
abstract int |
nextCodePoint()
Returns the next code point (with post-increment).
|
long |
previousCE(UVector32 offsets)
Returns the previous collation element.
|
abstract int |
previousCodePoint()
Returns the previous code point (with pre-decrement).
|
protected void |
reset() |
protected void |
reset(boolean numeric)
Resets the state as well as the numeric setting,
and completes the initialization.
|
abstract void |
resetToOffset(int newOffset)
Resets the iterator state and sets the position to the specified offset.
|
protected static final long NO_CP_AND_CE32
protected final Trie2_32 trie
protected final CollationData data
public CollationIterator(CollationData d)
In C++, there is only one constructor, and iterators are stack-allocated as needed.
public CollationIterator(CollationData d, boolean numeric)
public boolean equals(Object other)
Objecto must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true only if this ==
o. See Writing a correct
equals method
if you intend implementing your own equals method.
The general contract for the equals and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or neither of them.
equals in class Objectother - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public abstract void resetToOffset(int newOffset)
public abstract int getOffset()
public final long nextCE()
public final int fetchCEs()
public final long previousCE(UVector32 offsets)
public final int getCEsLength()
public final long getCE(int i)
public final long[] getCEs()
public final void clearCEsIfNoneRemaining()
public abstract int nextCodePoint()
public abstract int previousCodePoint()
protected final void reset()
protected final void reset(boolean numeric)
protected long handleNextCE32()
protected long makeCodePointAndCE32Pair(int c,
int ce32)
protected char handleGetTrailSurrogate()
protected boolean forbidSurrogateCodePoints()
protected abstract void forwardNumCodePoints(int num)
protected abstract void backwardNumCodePoints(int num)
protected int getDataCE32(int c)
protected int getCE32FromBuilderData(int ce32)
protected final void appendCEsFromCE32(CollationData d, int c, int ce32, boolean forward)
protected static final boolean isLeadSurrogate(int c)
protected static final boolean isTrailSurrogate(int c)