From 36b2e91e43d9794c439992960d21f54f2e179b6b Mon Sep 17 00:00:00 2001 From: Peter Edberg Date: Tue, 18 Mar 2014 21:52:16 +0000 Subject: [PATCH] ICU-10507 Better API documentation for asymmetric search (J) X-SVN-Rev: 35503 --- .../collate/src/com/ibm/icu/text/SearchIterator.java | 7 +++++++ .../classes/collate/src/com/ibm/icu/text/StringSearch.java | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/icu4j/main/classes/collate/src/com/ibm/icu/text/SearchIterator.java b/icu4j/main/classes/collate/src/com/ibm/icu/text/SearchIterator.java index 3fd4f5eca56..3ec4fc7fdb2 100644 --- a/icu4j/main/classes/collate/src/com/ibm/icu/text/SearchIterator.java +++ b/icu4j/main/classes/collate/src/com/ibm/icu/text/SearchIterator.java @@ -721,6 +721,13 @@ public abstract class SearchIterator /** * Option to control how collation elements are compared. * The default value will be {@link #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. * * @see #setElementComparisonType(ElementComparisonType) * @see #getElementComparisonType() diff --git a/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java b/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java index 4c2efb81dcd..43a68a0e7c4 100644 --- a/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java +++ b/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java @@ -96,6 +96,11 @@ import com.ibm.icu.util.ULocale; * for the pattern "abab" in the text "ababab", where mutually * exclusive matches only produces the result of 0. *

+ * Options are also provided to implement "asymmetric search" as described in + * + * UTS #10 Unicode Collation Algorithm, specifically the ElementComparisonType + * values. + *

* Though collator attributes will be taken into consideration while * performing matches, there are no APIs here for setting and getting the * attributes. These attributes can be set by getting the collator -- 2.40.0