java.text.CollationElementIterator (JDK 1.1)
A CollationElementIterator object is returned by the getCollationElementIterator() method of the RuleBasedCollator object. The purpose of this class is to allow a program to iterate (with the next() method) through the characters of a string, returning ordering values for each of the "collation keys" in the string. Note that collation keys are not exactly the same thing as characters. In the traditional Spanish collation order, for example, the two-character sequence "ch" is treated as a single collation key that comes alphabetically between the letters "c" and "d."
The value returned by the next() method is the collation order of the next collation key in the string. This numeric value can be directly compared to the value returned by next() for other CollationElementIterator objects. The value returned by next() can also be decomposed into primary, secondary, and tertiary ordering values with the static methods of this class.
This class is used by RuleBasedCollator to implement its compare() method, and to create CollationKey objects. Few applications ever need to use it directly.
public final classCollationElementIteratorextends Object { //No Constructor//Constantspublic static final intNULLORDER; //Class Methodspublic static final intprimaryOrder(intorder); public static final shortsecondaryOrder(intorder); public static final shorttertiaryOrder(intorder); //Public Instance Methodspublic intnext(); public voidreset(); }
Returned By:
RuleBasedCollator.getCollationElementIterator()