# Print output for @column tags ?> UnicodeSetSpanner.CountMethod - Android SDK | Android Developers

Most visited


Recently visited


UnicodeSetSpanner.CountMethod

public static final enum UnicodeSetSpanner.CountMethod
extends Enum<UnicodeSetSpanner.CountMethod>

java.lang.Object
   ↳ java.lang.Enum<android.icu.text.UnicodeSetSpanner.CountMethod>
     ↳ android.icu.text.UnicodeSetSpanner.CountMethod


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.

Summary


Enum values

UnicodeSetSpanner.CountMethod  MIN_ELEMENTS

Use the smallest number of elements in the spanned range for counting and modification, based on the UnicodeSet.SpanCondition

UnicodeSetSpanner.CountMethod  WHOLE_SPAN

Collapse spans. 

Public methods

static UnicodeSetSpanner.CountMethod valueOf(String name)
static final CountMethod[] values()

Inherited methods

Enum values


MIN_ELEMENTS

public static final UnicodeSetSpanner.CountMethod MIN_ELEMENTS

Use the smallest number of elements in the spanned range for counting and modification, based on the UnicodeSet.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.

WHOLE_SPAN

public static final UnicodeSetSpanner.CountMethod WHOLE_SPAN

Collapse spans. That is, modify/count the entire matching span as a single item, instead of separate set elements.

Public methods


valueOf

public static UnicodeSetSpanner.CountMethod valueOf (String name)

Parameters
name String

Returns
UnicodeSetSpanner.CountMethod

values

public static final CountMethod[] values ()

Returns
CountMethod[]

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.