Stay organized with collections
Save and categorize content based on your preferences.
ElementComparisonType
class ElementComparisonType
Option to control how collation elements are compared. The default value will be 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.
Summary
Enum values |
Collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1.
|
Collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1.
|
Standard collation element comparison at the specified collator strength.
|
Enum values
ANY_BASE_WEIGHT_IS_WILDCARD
enum val ANY_BASE_WEIGHT_IS_WILDCARD : SearchIterator.ElementComparisonType
Collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1.
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.
PATTERN_BASE_WEIGHT_IS_WILDCARD
enum val PATTERN_BASE_WEIGHT_IS_WILDCARD : SearchIterator.ElementComparisonType
Collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1.
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# SearchIterator.ElementComparisonType\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nElementComparisonType\n=====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/icu/text/SearchIterator.ElementComparisonType \"View this page in Java\") \n\n```\nclass ElementComparisonType\n```\n\n|---|---|------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\\\u003c[android.icu.text.SearchIterator.ElementComparisonType](#)\\\u003e ||\n| | ↳ | [android.icu.text.SearchIterator.ElementComparisonType](#) |\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [SearchIterator.ElementComparisonType.ANY_BASE_WEIGHT_IS_WILDCARD](#ENUM_VALUE:ANY_BASE_WEIGHT_IS_WILDCARD), [SearchIterator.ElementComparisonType.PATTERN_BASE_WEIGHT_IS_WILDCARD](#ENUM_VALUE:PATTERN_BASE_WEIGHT_IS_WILDCARD), [SearchIterator.ElementComparisonType.STANDARD_ELEMENT_COMPARISON](#ENUM_VALUE:STANDARD_ELEMENT_COMPARISON) |---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| | [SearchIterator.ElementComparisonType.ANY_BASE_WEIGHT_IS_WILDCARD](#ENUM_VALUE:ANY_BASE_WEIGHT_IS_WILDCARD) | Collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1. | | [SearchIterator.ElementComparisonType.PATTERN_BASE_WEIGHT_IS_WILDCARD](#ENUM_VALUE:PATTERN_BASE_WEIGHT_IS_WILDCARD) | Collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1. | | [SearchIterator.ElementComparisonType.STANDARD_ELEMENT_COMPARISON](#ENUM_VALUE:STANDARD_ELEMENT_COMPARISON) | Standard collation element comparison at the specified collator strength. | |\n\nOption to control how collation elements are compared. The default value will be [STANDARD_ELEMENT_COMPARISON](#).\n\nPATTERN_BASE_WEIGHT_IS_WILDCARD supports \"asymmetric search\" as described in [UTS #10 Unicode Collation Algorithm](http://www.unicode.org/reports/tr10/#Asymmetric_Search), 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.\n\nSummary\n-------\n\n| Enum values ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [ANY_BASE_WEIGHT_IS_WILDCARD](#ENUM_VALUE:ANY_BASE_WEIGHT_IS_WILDCARD) Collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1. |\n| [PATTERN_BASE_WEIGHT_IS_WILDCARD](#ENUM_VALUE:PATTERN_BASE_WEIGHT_IS_WILDCARD) Collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1. |\n| [STANDARD_ELEMENT_COMPARISON](#ENUM_VALUE:STANDARD_ELEMENT_COMPARISON) Standard collation element comparison at the specified collator strength. |\n\nEnum values\n-----------\n\n### ANY_BASE_WEIGHT_IS_WILDCARD\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val ANY_BASE_WEIGHT_IS_WILDCARD : SearchIterator.ElementComparisonType\n```\n\nCollation element comparison is modified to effectively provide behavior between the specified strength and strength - 1.\n\nCollation 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. \n\n### PATTERN_BASE_WEIGHT_IS_WILDCARD\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val PATTERN_BASE_WEIGHT_IS_WILDCARD : SearchIterator.ElementComparisonType\n```\n\nCollation element comparison is modified to effectively provide behavior between the specified strength and strength - 1.\n\nCollation 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. \n\n### STANDARD_ELEMENT_COMPARISON\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val STANDARD_ELEMENT_COMPARISON : SearchIterator.ElementComparisonType\n```\n\nStandard collation element comparison at the specified collator strength."]]