|
|||||||||
| Home >> All >> java >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.text
Class CollationElementIterator

java.lang.Objectjava.text.CollationElementIterator
- public final class CollationElementIterator
- extends java.lang.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.
| Field Summary | |
(package private) RuleBasedCollator |
collator
This is the RuleBasedCollator this object was created from. |
(package private) int |
index
This is the index into the collation decomposition where we are currently scanning. |
static int |
NULLORDER
This is a constant value that is returned to indicate that the end of the string was encountered. |
(package private) java.lang.String |
text
This is the String that is being iterated over. |
private RuleBasedCollator.CollationElement[] |
text_decomposition
Array containing the collation decomposition of the text given to the constructor. |
private int[] |
text_indexes
Array containing the index of the specified block. |
(package private) int |
textIndex
This is the index into the String where we are currently scanning. |
| Constructor Summary | |
(package private) |
CollationElementIterator(RuleBasedCollator collator,
java.lang.String text)
This method initializes a new instance of CollationElementIterator
to iterate over the specified String using the rules in the
specified RuleBasedCollator. |
| Method Summary | |
int |
getMaxExpansion(int value)
This method returns the maximum length of any expansion sequence that ends with the specified collation order value. |
int |
getOffset()
This method returns the current offset into the String
that is being iterated over. |
int |
next()
This method returns the collation ordering value of the next character sequence in the string (it may be an extended character following collation rules). |
(package private) RuleBasedCollator.CollationElement |
nextBlock()
|
int |
previous()
This method returns the collation ordering value of the previous character in the string. |
(package private) RuleBasedCollator.CollationElement |
previousBlock()
|
static int |
primaryOrder(int order)
This method returns the primary order value for the given collation value. |
void |
reset()
This method resets the internal position pointer to read from the beginning of the String again. |
static short |
secondaryOrder(int order)
This method returns the secondary order value for the given collation value. |
void |
setOffset(int offset)
This method sets the iteration index position into the current String to the specified value. |
void |
setText(CharacterIterator source)
This method sets the String that it is iterating over
to the String represented by the specified
CharacterIterator. |
void |
setText(java.lang.String text)
This method sets the String that it is iterating over
to the specified String. |
static short |
tertiaryOrder(int order)
This method returns the tertiary order value for the given collation value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
NULLORDER
public static final int NULLORDER
- This is a constant value that is returned to indicate that the end of
the string was encountered.
- See Also:
- Constant Field Values
collator
RuleBasedCollator collator
- This is the RuleBasedCollator this object was created from.
text
java.lang.String text
- This is the String that is being iterated over.
index
int index
- This is the index into the collation decomposition where we are currently scanning.
textIndex
int textIndex
- This is the index into the String where we are currently scanning.
text_decomposition
private RuleBasedCollator.CollationElement[] text_decomposition
- Array containing the collation decomposition of the
text given to the constructor.
text_indexes
private int[] text_indexes
- Array containing the index of the specified block.
| Constructor Detail |
CollationElementIterator
CollationElementIterator(RuleBasedCollator collator, java.lang.String text)
- This method initializes a new instance of
CollationElementIteratorto iterate over the specifiedStringusing the rules in the specifiedRuleBasedCollator.
| Method Detail |
nextBlock
RuleBasedCollator.CollationElement nextBlock()
previousBlock
RuleBasedCollator.CollationElement previousBlock()
next
public int next()
- This method returns the collation ordering value of the next character sequence
in the string (it may be an extended character following collation rules).
This method will return
NULLORDERif the end of the string was reached.
previous
public int previous()
- This method returns the collation ordering value of the previous character
in the string. This method will return
NULLORDERif the beginning of the string was reached.
primaryOrder
public static int primaryOrder(int order)
- This method returns the primary order value for the given collation
value.
reset
public void reset()
- This method resets the internal position pointer to read from the
beginning of the
Stringagain.
secondaryOrder
public static short secondaryOrder(int order)
- This method returns the secondary order value for the given collation
value.
tertiaryOrder
public static short tertiaryOrder(int order)
- This method returns the tertiary order value for the given collation
value.
setText
public void setText(java.lang.String text)
- This method sets the
Stringthat it is iterating over to the specifiedString.- Since:
- 1.2
setText
public void setText(CharacterIterator source)
- This method sets the
Stringthat it is iterating over to theStringrepresented by the specifiedCharacterIterator.
getOffset
public int getOffset()
- This method returns the current offset into the
Stringthat is being iterated over.- Since:
- 1.2
setOffset
public void setOffset(int offset)
- This method sets the iteration index position into the current
Stringto the specified value. This value must not be negative and must not be greater than the last index position in theString.
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).
|
|||||||||
| Home >> All >> java >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
java.text.CollationElementIterator