public static enum SearchIterator.ElementComparisonType extends Enum<SearchIterator.ElementComparisonType>
STANDARD_ELEMENT_COMPARISON.
PATTERN_BASE_WEIGHT_IS_WILDCARD supports "asymmetric search" as described in UTS #10 Unicode Collation Algorithm, while ANY_BASE_WEIGHT_IS_WILDCARD supports a related option in which "unmarked" characters in either the pattern or the searched text are treated as wildcards that match marked or unmarked versions of the same character.
| 枚举常量 | 说明 |
|---|---|
ANY_BASE_WEIGHT_IS_WILDCARD |
Collation element comparison is modified to effectively provide behavior
between the specified strength and strength - 1.
|
PATTERN_BASE_WEIGHT_IS_WILDCARD |
Collation element comparison is modified to effectively provide behavior
between the specified strength and strength - 1.
|
STANDARD_ELEMENT_COMPARISON |
Standard collation element comparison at the specified collator strength.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static SearchIterator.ElementComparisonType |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static SearchIterator.ElementComparisonType[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (SearchIterator.ElementComparisonType c : SearchIterator.ElementComparisonType.values()) System.out.println(c); |
public static final SearchIterator.ElementComparisonType STANDARD_ELEMENT_COMPARISON
public static final SearchIterator.ElementComparisonType PATTERN_BASE_WEIGHT_IS_WILDCARD
Collation elements in the pattern that have the base weight for the specified strength are treated as "wildcards" that match an element with any other weight at that collation level in the searched text. For example, with a secondary-strength English collator, a plain 'e' in the pattern will match a plain e or an e with any diacritic in the searched text, but an e with diacritic in the pattern will only match an e with the same diacritic in the searched text.
public static final SearchIterator.ElementComparisonType ANY_BASE_WEIGHT_IS_WILDCARD
Collation elements in either the pattern or the searched text that have the base weight for the specified strength are treated as "wildcards" that match an element with any other weight at that collation level. For example, with a secondary-strength English collator, a plain 'e' in the pattern will match a plain e or an e with any diacritic in the searched text, but an e with diacritic in the pattern will only match an e with the same diacritic or a plain e in the searched text.
public static SearchIterator.ElementComparisonType[] values()
for (SearchIterator.ElementComparisonType c : SearchIterator.ElementComparisonType.values()) System.out.println(c);
public static SearchIterator.ElementComparisonType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值