java.text
Class CollationElementIterator
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
.
static int | NULLORDER - This is a constant value that is returned to indicate that the end of
the string was encountered.
|
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).
|
int | previous() - This method returns the collation ordering value of the previous character
in the string.
|
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(String text) - This method sets the
String that it is iterating over
to the specified String .
|
void | setText(CharacterIterator source) - This method sets the
String that it is iterating over
to the String represented by the specified
CharacterIterator .
|
static short | tertiaryOrder(int order) - This method returns the tertiary order value for the given collation
value.
|
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
NULLORDER
public static final int NULLORDER
This is a constant value that is returned to indicate that the end of
the string was encountered.
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).
value
- The collation order value
- The maximum length of an expansion sequence.
getOffset
public int getOffset()
This method returns the current offset into the String
that is being iterated over.
- The iteration index position.
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 NULLORDER
if the
end of the string was reached.
- The collation ordering value.
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.
- The collation ordering value.
primaryOrder
public static int primaryOrder(int order)
This method returns the primary order value for the given collation
value.
order
- The collation value returned from next()
or
previous()
.
- The primary order value of the specified collation value. This is
the high 16 bits.
reset
public void reset()
This method resets the internal position pointer to read from the
beginning of the String
again.
secondaryOrder
public static short secondaryOrder(int order)
This method returns the secondary order value for the given collation
value.
order
- The collation value returned from next()
or
previous()
.
- The secondary order value of the specified collation value. This
is the bits 8-15.
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
.
offset
- The new iteration index position.
setText
public void setText(String text)
This method sets the String
that it is iterating over
to the specified String
.
text
- The new String
to iterate over.
setText
public void setText(CharacterIterator source)
This method sets the String
that it is iterating over
to the String
represented by the specified
CharacterIterator
.
source
- The CharacterIterator
containing the new
String
to iterate over.
tertiaryOrder
public static short tertiaryOrder(int order)
This method returns the tertiary order value for the given collation
value.
order
- The collation value returned from next()
or
previous()
.
- The tertiary order value of the specified collation value. This
is the low eight bits.
CollationElementIterator.java -- Walks through collation elements
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.