From fe6c7107d625ce36e687ed95f57c607e869ff62b Mon Sep 17 00:00:00 2001 From: Vladimir Weinstein Date: Wed, 16 Nov 2005 01:09:12 +0000 Subject: [PATCH] ICU-4925 Improve UnicodeSet and UnicodeSetIterator documentation X-SVN-Rev: 18799 --- icu4j/src/com/ibm/icu/text/UnicodeSet.java | 2 ++ icu4j/src/com/ibm/icu/text/UnicodeSetIterator.java | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/icu4j/src/com/ibm/icu/text/UnicodeSet.java b/icu4j/src/com/ibm/icu/text/UnicodeSet.java index 638d96da61..13a1e4d4f7 100755 --- a/icu4j/src/com/ibm/icu/text/UnicodeSet.java +++ b/icu4j/src/com/ibm/icu/text/UnicodeSet.java @@ -260,9 +260,11 @@ import java.util.regex.Pattern; * * * + *

To iterate over contents of UnicodeSet, use UnicodeSetIterator class. * * @author Alan Liu * @stable ICU 2.0 + * @see UnicodeSetIterator */ public class UnicodeSet extends UnicodeFilter { diff --git a/icu4j/src/com/ibm/icu/text/UnicodeSetIterator.java b/icu4j/src/com/ibm/icu/text/UnicodeSetIterator.java index 71a6de67f7..18e2f187fe 100755 --- a/icu4j/src/com/ibm/icu/text/UnicodeSetIterator.java +++ b/icu4j/src/com/ibm/icu/text/UnicodeSetIterator.java @@ -1,6 +1,6 @@ /* ******************************************************************************* - * Copyright (C) 1996-2004, International Business Machines Corporation and * + * Copyright (C) 1996-2005, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -16,9 +16,9 @@ import java.util.*; * *

To iterate over code points, use a loop like this: *

- * UnicodeSetIterator it(set);
+ * UnicodeSetIterator it = new UnicodeSetIterator(set);
  * while (set.next()) {
- *   if (set.codepoint != UnicodeSetIterator::IS_STRING) {
+ *   if (set.codepoint != UnicodeSetIterator.IS_STRING) {
  *     processCodepoint(set.codepoint);
  *   } else {
  *     processString(set.string);
@@ -28,9 +28,9 @@ import java.util.*;
  *
  * 

To iterate over code point ranges, use a loop like this: *

- * UnicodeSetIterator it(set);
+ * UnicodeSetIterator it = new UnicodeSetIterator(set);
  * while (set.nextRange()) {
- *   if (set.codepoint != UnicodeSetIterator::IS_STRING) {
+ *   if (set.codepoint != UnicodeSetIterator.IS_STRING) {
  *     processCodepointRange(set.codepoint, set.codepointEnd);
  *   } else {
  *     processString(set.string);