Package com.ibm.icu.text
Enum UnicodeSetSpanner.CountMethod
- All Implemented Interfaces:
Serializable
,Comparable<UnicodeSetSpanner.CountMethod>
,java.lang.constant.Constable
- Enclosing class:
UnicodeSetSpanner
Options for replaceFrom and countIn to control how to treat each matched span.
It is similar to whether one is replacing [abc] by x, or [abc]* by x.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUse the smallest number of elements in the spanned range for counting and modification, based on theUnicodeSet.SpanCondition
.Collapse spans. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static UnicodeSetSpanner.CountMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
WHOLE_SPAN
Collapse spans. That is, modify/count the entire matching span as a single item, instead of separate set elements. -
MIN_ELEMENTS
Use the smallest number of elements in the spanned range for counting and modification, based on theUnicodeSet.SpanCondition
. If the set has no strings, this will be the same as the number of spanned code points.For example, in the string "abab" with SpanCondition.SIMPLE:
- spanning with [ab] will count four MIN_ELEMENTS.
- spanning with [{ab}] will count two MIN_ELEMENTS.
- spanning with [ab{ab}] will also count two MIN_ELEMENTS.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-