diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/StringRange.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/StringRange.java index 9b52085d81f..f66f44c3581 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/StringRange.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/StringRange.java @@ -45,7 +45,7 @@ public class StringRange { /** * Compact the set of strings. - * @param source + * @param source set of strings * @param adder adds each pair to the output. See the {@link Adder} interface. * @param shorterPairs use abc-d instead of abc-abd * @param moreCompact use a more compact form, at the expense of more processing. If false, source must be sorted. @@ -101,9 +101,9 @@ public class StringRange { /** * Faster but not as good compaction. Only looks at final codepoint. - * @param source - * @param adder - * @param shorterPairs + * @param source set of strings + * @param adder adds each pair to the output. See the {@link Adder} interface. + * @param shorterPairs use abc-d instead of abc-abd */ public static void compact(Set source, Adder adder, boolean shorterPairs) { compact(source,adder,shorterPairs,false); @@ -166,10 +166,7 @@ public class StringRange { } } public boolean merge(int pivot, Ranges other) { -// if (this.toString().equals("afz")) { -// int debug = 0; -// } - // we will merge items if the pivot is adjacent, and all other ranges are equal + // We merge items if the pivot is adjacent, and all later ranges are equal. for (int i = ranges.length-1; i >= 0; --i) { if (i == pivot) { if (ranges[i].max != other.ranges[i].min-1) { // not adjacent diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeSet.java b/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeSet.java index 1f4abe58d24..c690878fe85 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeSet.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeSet.java @@ -2432,17 +2432,17 @@ public class UnicodeSet extends UnicodeFilter implements Iterable, Compa return this; } - // Add constants to make the code easier to follow + // Add constants to make the applyPattern() code easier to follow. - static final int LAST0_START = 0, + private static final int LAST0_START = 0, LAST1_RANGE = 1, LAST2_SET = 2; - static final int MODE0_NONE = 0, + private static final int MODE0_NONE = 0, MODE1_INBRACKET = 1, MODE2_OUTBRACKET = 2; - static final int SETMODE0_NONE = 0, + private static final int SETMODE0_NONE = 0, SETMODE1_UNICODESET = 1, SETMODE2_PROPERTYPAT = 2, SETMODE3_PREPARSED = 3;