public final class CollationElementIteratorICU extends Object
RuleBasedCollator coll = Collator.getInstance();
CollationElementIterator iterator = coll.getCollationElementIterator("abc");
int ce = 0;
while (ce != CollationElementIterator.NULLORDER) {
ce = iterator.next();
}
iterator.reset();
while (ce != CollationElementIterator.NULLORDER) {
ce = iterator.previous();
}
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize()
Garbage collection.
|
static CollationElementIteratorICU |
getInstance(long collatorAddress,
String source) |
int |
getMaxExpansion(int order)
Get the maximum length of any expansion sequences that end with the
specified comparison order.
|
int |
getOffset()
Get the offset of the current source character.
|
int |
next()
Get the ordering priority of the next collation element in the text.
|
int |
previous()
Get the ordering priority of the previous collation element in the text.
|
static int |
primaryOrder(int order)
Gets the primary order of a collation order.
|
void |
reset()
Reset the collation elements to their initial state.
|
static int |
secondaryOrder(int order)
Gets the secondary order of a collation order.
|
void |
setOffset(int offset)
Set the offset of the current source character.
|
void |
setText(CharacterIterator source) |
void |
setText(String source)
Set the text containing the collation elements.
|
static int |
tertiaryOrder(int order)
Gets the tertiary order of a collation order.
|
public void reset()
public int next()
public int previous()
public int getMaxExpansion(int order)
order - collation order returned by previous or next.public void setText(String source)
source - text containing the collation elements.public void setText(CharacterIterator source)
public int getOffset()
public void setOffset(int offset)
offset - The desired character offset.public static int primaryOrder(int order)
order - the collation orderpublic static int secondaryOrder(int order)
order - the collation orderpublic static int tertiaryOrder(int order)
order - the collation orderpublic static CollationElementIteratorICU getInstance(long collatorAddress, String source)