CollationElementIterator.java [plain text]
package java.text;
public final class CollationElementIterator
{
public static final int NULLORDER = 0xffffffff;
public int next ()
{
if (index == text.length())
return NULLORDER;
return collator.ceiNext(this);
}
public static final int primaryOrder (int order)
{
return order >>> 16;
}
public void reset ()
{
index = 0;
}
public static final short secondaryOrder (int order)
{
return (short) ((order >>> 8) & 255);
}
public static final short tertiaryOrder (int order)
{
return (short) (order & 255);
}
CollationElementIterator (String text, RuleBasedCollator collator)
{
this.text = text;
this.index = 0;
this.lookahead_set = false;
this.lookahead = 0;
this.collator = collator;
}
String text;
int index;
boolean lookahead_set;
int lookahead;
RuleBasedCollator collator;
}