]> granicus.if.org Git - icu/commitdiff
ICU-10507 Better API documentation for asymmetric search (J)
authorPeter Edberg <pedberg@unicode.org>
Tue, 18 Mar 2014 21:52:16 +0000 (21:52 +0000)
committerPeter Edberg <pedberg@unicode.org>
Tue, 18 Mar 2014 21:52:16 +0000 (21:52 +0000)
X-SVN-Rev: 35503

icu4j/main/classes/collate/src/com/ibm/icu/text/SearchIterator.java
icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java

index 3fd4f5eca561f6558f0dbde163c7f831f0c74c86..3ec4fc7fdb26e98bdbaec872324b57217b288a20 100644 (file)
@@ -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}.
+     * <p>
+     * PATTERN_BASE_WEIGHT_IS_WILDCARD supports "asymmetric search" as described in
+     * <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search">
+     * UTS #10 Unicode Collation Algorithm</a>, 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()
index 4c2efb81dcde6937d4c52522141e8029cfd59290..43a68a0e7c4f3ecc8b8cc958aa5392bc068fbc0c 100644 (file)
@@ -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.
  * <p>
+ * Options are also provided to implement "asymmetric search" as described in
+ * <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search">
+ * UTS #10 Unicode Collation Algorithm</a>, specifically the ElementComparisonType
+ * values.
+ * <p>
  * 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