Package com.ibm.icu.impl.coll
Class FCDUTF16CollationIterator
- java.lang.Object
-
- com.ibm.icu.impl.coll.CollationIterator
-
- com.ibm.icu.impl.coll.UTF16CollationIterator
-
- com.ibm.icu.impl.coll.FCDUTF16CollationIterator
-
public final class FCDUTF16CollationIterator extends UTF16CollationIterator
Incrementally checks the input text for FCD and normalizes where necessary.
-
-
Field Summary
-
Fields inherited from class com.ibm.icu.impl.coll.UTF16CollationIterator
limit, pos, seq, start
-
Fields inherited from class com.ibm.icu.impl.coll.CollationIterator
data, NO_CP_AND_CE32, trie
-
-
Constructor Summary
Constructors Constructor Description FCDUTF16CollationIterator(CollationData d)Partial constructor, seeCollationIterator(CollationData).FCDUTF16CollationIterator(CollationData data, boolean numeric, CharSequence s, int p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbackwardNumCodePoints(int num)booleanequals(Object other)Compares this instance with the specified object and indicates if they are equal.protected voidforwardNumCodePoints(int num)intgetOffset()protected longhandleNextCE32()Returns the next code point and its local CE32 value.inthashCode()Returns an integer hash code for this object.intnextCodePoint()Returns the next code point (with post-increment).intpreviousCodePoint()Returns the previous code point (with pre-decrement).voidresetToOffset(int newOffset)Resets the iterator state and sets the position to the specified offset.voidsetText(boolean numeric, CharSequence s, int p)-
Methods inherited from class com.ibm.icu.impl.coll.UTF16CollationIterator
handleGetTrailSurrogate
-
Methods inherited from class com.ibm.icu.impl.coll.CollationIterator
appendCEsFromCE32, clearCEsIfNoneRemaining, fetchCEs, forbidSurrogateCodePoints, getCE, getCE32FromBuilderData, getCEs, getCEsLength, getDataCE32, isLeadSurrogate, isTrailSurrogate, makeCodePointAndCE32Pair, nextCE, previousCE, reset, reset
-
-
-
-
Constructor Detail
-
FCDUTF16CollationIterator
public FCDUTF16CollationIterator(CollationData d)
Partial constructor, seeCollationIterator(CollationData).
-
FCDUTF16CollationIterator
public FCDUTF16CollationIterator(CollationData data, boolean numeric, CharSequence s, int p)
-
-
Method Detail
-
equals
public boolean equals(Object other)
Description copied from class:ObjectCompares this instance with the specified object and indicates if they are equal. In order to be equal,omust 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
trueonly ifthis == o. See Writing a correctequalsmethod if you intend implementing your ownequalsmethod.The general contract for the
equalsandObject.hashCode()methods is that ifequalsreturnstruefor any two objects, thenhashCode()must return the same value for these objects. This means that subclasses ofObjectusually override either both methods or neither of them.- Overrides:
equalsin classUTF16CollationIterator- Parameters:
other- the object to compare this instance with.- Returns:
trueif the specified object is equal to thisObject;falseotherwise.- See Also:
Object.hashCode()
-
hashCode
public int hashCode()
Description copied from class:ObjectReturns an integer hash code for this object. By contract, any two objects for whichObject.equals(java.lang.Object)returnstruemust return the same hash code value. This means that subclasses ofObjectusually override both methods or neither method.Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCodemethod if you intend implementing your ownhashCodemethod.- Overrides:
hashCodein classUTF16CollationIterator- Returns:
- this object's hash code.
- See Also:
Object.equals(java.lang.Object)
-
resetToOffset
public void resetToOffset(int newOffset)
Description copied from class:CollationIteratorResets the iterator state and sets the position to the specified offset. Subclasses must implement, and must call the parent class method, or CollationIterator.reset().- Overrides:
resetToOffsetin classUTF16CollationIterator
-
getOffset
public int getOffset()
- Overrides:
getOffsetin classUTF16CollationIterator
-
setText
public void setText(boolean numeric, CharSequence s, int p)- Overrides:
setTextin classUTF16CollationIterator
-
nextCodePoint
public int nextCodePoint()
Description copied from class:CollationIteratorReturns the next code point (with post-increment). Public for identical-level comparison and for testing.- Overrides:
nextCodePointin classUTF16CollationIterator
-
previousCodePoint
public int previousCodePoint()
Description copied from class:CollationIteratorReturns the previous code point (with pre-decrement). Public for identical-level comparison and for testing.- Overrides:
previousCodePointin classUTF16CollationIterator
-
handleNextCE32
protected long handleNextCE32()
Description copied from class:CollationIteratorReturns 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.- Overrides:
handleNextCE32in classUTF16CollationIterator
-
forwardNumCodePoints
protected void forwardNumCodePoints(int num)
- Overrides:
forwardNumCodePointsin classUTF16CollationIterator
-
backwardNumCodePoints
protected void backwardNumCodePoints(int num)
- Overrides:
backwardNumCodePointsin classUTF16CollationIterator
-
-