Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
com.ibm.icu.text.ComposedCharIter
public final class ComposedCharIter
extends Object
canonically decomposed
forms of all
characters used in a particular language. When you process input text using
this table, the text must first be decomposed so that it matches the form
used in the table. This can impose a performance penalty that may be
unacceptable in some situations.
You can avoid this problem by ensuring that the collation table contains
rules for both the decomposed and composed versions of each character.
To do so, use a ComposedCharIter to iterate through all of the
composed characters in Unicode. If the decomposition for that character
consists solely of characters that are listed in your ruleset, you can
add a new rule for the composed character that makes it equivalent to
its decomposition sequence.
Note that ComposedCharIter iterates over a static table
of the composed characters in Unicode. If you want to iterate over the
composed characters in a particular string, use Normalizer
instead.
When constructing a ComposedCharIter there is one
optional feature that you can enable or disable:
Normalizer.IGNORE_HANGUL
- Do not iterate over the Hangul
characters and their corresponding Jamo decompositions.
This option is off by default (i.e. Hangul processing is enabled)
since the Unicode standard specifies that Hangul to Jamo
is a canonical decomposition.
Field Summary | |
static char |
|
Constructor Summary | |
| |
|
Method Summary | |
String |
|
boolean |
|
char |
|
public static final char DONE
Deprecated. ICU 2.2
Constant that indicates the iteration has completed.next()
returns this value when there are no more composed characters over which to iterate.
public ComposedCharIter()
Deprecated. ICU 2.2
Construct a new ComposedCharIter. The iterator will return all Unicode characters with canonical decompositions, including Korean Hangul characters.
public ComposedCharIter(boolean compat, int options)
Deprecated. ICU 2.2
Constructs a non-default ComposedCharIter with optional behavior.
- Parameters:
compat
- false for canonical decompositions only; true for both canonical and compatibility decompositions.options
- Optional decomposition features. Currently, the only supported option isNormalizer.IGNORE_HANGUL
, which causes this ComposedCharIter not to iterate over the Hangul characters and their corresponding Jamo decompositions.
public String decomposition()
Deprecated. ICU 2.2
Returns the Unicode decomposition of the current character. This method returns the decomposition of the precomposed character most recently returned bynext()
. The resulting decomposition is affected by the settings of the options passed to the constructor.
public boolean hasNext()
Deprecated. ICU 2.2
Determines whether there any precomposed Unicode characters not yet returned bynext()
.
public char next()
Deprecated. ICU 2.2