Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.text

Class CollationElementIterator

java.lang.Object
|
+--java.text.CollationElementIterator


public final class CollationElementIterator

extends Object

This class walks through the character collation elements of a String as defined by the collation rules in an instance of RuleBasedCollator. There is no public constructor for this class. An instance is created by calling the getCollationElementIterator method on RuleBasedCollator.

Author:

Field Summary

static intNULLORDER

This is a constant value that is returned to indicate that the end of the string was encountered.

Method Summary

intgetMaxExpansion(int value)

This method returns the maximum length of any expansion sequence that ends with the specified collation order value.
intgetOffset()

This method returns the current offset into the String that is being iterated over.
intnext()

This method returns the collation ordering value of the next character in the string.
intprevious()

This method returns the collation ordering value of the previous character in the string.
static intprimaryOrder(int order)

This method returns the primary order value for the given collation value.
voidreset()

This method resets the internal position pointer to read from the beginning of the String again.
static shortsecondaryOrder(int order)

This method returns the secondary order value for the given collation value.
voidsetOffset(int offset)

This method sets the iteration index position into the current String to the specified value.
voidsetText(java.lang.String str)

This method sets the String that it is iterating over to the specified String.
voidsetText(java.text.CharacterIterator ci)

This method sets the String that it is iterating over to the String represented by the specified CharacterIterator.
static shorttertiaryOrder(int order)

This method returns the tertiary order value for the given collation value.

Field Details

NULLORDER

public static final int NULLORDER

This is a constant value that is returned to indicate that the end of the string was encountered.


Method Details

getMaxExpansion

public int getMaxExpansion(int value)

This method returns the maximum length of any expansion sequence that ends with the specified collation order value. (Whatever that means).

Parameters:


getOffset

public int getOffset()

This method returns the current offset into the String that is being iterated over.

Returns:


next

public int next()

This method returns the collation ordering value of the next character in the string. This method will return NULLORDER if the end of the string was reached.

Returns:


previous

public int previous()

This method returns the collation ordering value of the previous character in the string. This method will return NULLORDER if the beginning of the string was reached.

Returns:


primaryOrder

public static final int primaryOrder(int order)

This method returns the primary order value for the given collation value.

Parameters:

Returns:


reset

public void reset()

This method resets the internal position pointer to read from the beginning of the String again.


secondaryOrder

public static final short secondaryOrder(int order)

This method returns the secondary order value for the given collation value.

Parameters:

Returns:


setOffset

public void setOffset(int offset)

This method sets the iteration index position into the current String to the specified value. This value must not be negative and must not be greater than the last index position in the String.

Parameters:

Throws:


setText

public void setText(java.lang.String str)

This method sets the String that it is iterating over to the specified String.

Parameters:


setText

public void setText(java.text.CharacterIterator ci)

This method sets the String that it is iterating over to the String represented by the specified CharacterIterator.

Parameters:


tertiaryOrder

public static final short tertiaryOrder(int order)

This method returns the tertiary order value for the given collation value.

Parameters:

Returns: