|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<UnicodeSet.SpanCondition>
com.ibm.icu.text.UnicodeSet.SpanCondition
public static enum UnicodeSet.SpanCondition
Argument values for whether span() and similar functions continue while the current character is contained vs. not contained in the set.
The functionality is straightforward for sets with only single code points, without strings (which is the common case):
Note: Unpaired surrogates are treated like surrogate code points. Similarly, set strings match only on code point boundaries, never in the middle of a surrogate pair.
Enum Constant Summary | |
---|---|
CONDITION_COUNT
One more than the last span condition. |
|
CONTAINED
Continue a span() while there is a set element at the current position. |
|
NOT_CONTAINED
Continue a span() while there is no set element at the current position. |
|
SIMPLE
Continue a span() while there is a set element at the current position. |
Method Summary | |
---|---|
static UnicodeSet.SpanCondition |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static UnicodeSet.SpanCondition[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final UnicodeSet.SpanCondition NOT_CONTAINED
When span() returns, the substring between where it started and the position it returned consists only of characters that are not in the set, and none of its strings overlap with the span.
public static final UnicodeSet.SpanCondition CONTAINED
When span() returns, the substring between where it started and the position it returned consists only of set elements (characters or strings) that are in the set.
If a set contains strings, then the span will be the longest substring matching any of the possible concatenations of set elements (characters or strings). (There must be a single, non-overlapping concatenation of characters or strings.) This is equivalent to a POSIX regular expression for (OR of each set element)*.
public static final UnicodeSet.SpanCondition SIMPLE
When span() returns, the substring between where it started and the position it returned consists only of set elements (characters or strings) that are in the set.
If a set only contains single characters, then this is the same as CONTAINED.
If a set contains strings, then the span will be the longest substring with a match at each position with the longest single set element (character or string).
Use this span condition together with other longest-match algorithms, such as ICU converters (ucnv_getUnicodeSet()).
public static final UnicodeSet.SpanCondition CONDITION_COUNT
Method Detail |
---|
public static UnicodeSet.SpanCondition[] values()
for (UnicodeSet.SpanCondition c : UnicodeSet.SpanCondition.values()) System.out.println(c);
public static UnicodeSet.SpanCondition valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |