mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-11738 minor fixes
X-SVN-Rev: 37957
This commit is contained in:
parent
5faab922bd
commit
c776894097
2 changed files with 9 additions and 12 deletions
|
@ -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<String> 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
|
||||
|
|
|
@ -2432,17 +2432,17 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, 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;
|
||||
|
|
Loading…
Add table
Reference in a new issue