java.text.CollationElementIterator
java.lang.Object
None
None
New as of JDK 1.1
A RuleBasedCollator object creates an instance of the CollationElementIterator class to iterate through the characters of a string and determine their relative collation sequence. A CollationElementIterator object performs callbacks to the RuleBasedCollator that created it to get the information it needs to recognize groups of characters that are treated as single collation characters. For example, a RuleBasedCollator for a Spanish language locale would be set up to treat `ch' as a single letter. A CollationElementIterator object also gets information from its RuleBasedCollator that is used to determine the collation ordering priority for characters.
A collation-ordering priority of a character is a composite integer value that determines how the character is collated. This priority is comprised of:
The next() method returns the collation-ordering priority of the next logical character. Primary, secondary, and tertiary orders are extracted from an ordering priority with the primaryOrder(), secondaryOrder(), and tertiaryOrder() methods.
public final class java.text.CollationElementIterator extends java.lang.Object { // Constants public static final int NULLORDER; // Class Methods public static final int primaryOrder(int order); public static final short secondaryOrder(int order); public static final short tertiaryOrder(int order); // Instance Methods public int next(); public void reset(); }
A constant that is returned by next() if the end of the string has been reached.
The primary order component of the given order key.
This method extracts the primary order value from the given order key.
The secondary order component of the given order key.
This method extracts the secondary order value from the given order key.
The tertiary order component of the given order key.
This method extracts the tertiary order value from the given order key.
The order value of the next character in the string.
This method returns the order key for the next character in the string. The returned value can be broken apart using the primaryOrder(), secondaryOrder(), and tertiaryOrder() methods.
This method resets the position of this CollationElementIterator to the beginning of the string.
Method | Inherited From | Method | Inherited From |
---|---|---|---|
clone() |
Object |
equals(Object) |
Object |
finalize() |
Object |
getClass() |
Object |
hashCode() |
Object |
notify() |
Object |
notifyAll() |
Object |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
Collator, RuleBasedCollator, String