public class StringRange extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
StringRange.Adder |
| Modifier and Type | Field and Description |
|---|---|
static Comparator<int[]> |
COMPARE_INT_ARRAYS |
| Constructor and Description |
|---|
StringRange() |
| Modifier and Type | Method and Description |
|---|---|
static void |
compact(Set<String> source,
StringRange.Adder adder,
boolean shorterPairs)
Faster but not as good compaction.
|
static void |
compact(Set<String> source,
StringRange.Adder adder,
boolean shorterPairs,
boolean moreCompact)
Compact the set of strings.
|
static Collection<String> |
expand(String start,
String end,
boolean requireSameLength,
Collection<String> output) |
public static final Comparator<int[]> COMPARE_INT_ARRAYS
public static void compact(Set<String> source, StringRange.Adder adder, boolean shorterPairs, boolean moreCompact)
source - set of stringsadder - adds each pair to the output. See the StringRange.Adder interface.shorterPairs - use abc-d instead of abc-abdmoreCompact - use a more compact form, at the expense of more processing. If false, source must be sorted.public static void compact(Set<String> source, StringRange.Adder adder, boolean shorterPairs)
source - set of stringsadder - adds each pair to the output. See the StringRange.Adder interface.shorterPairs - use abc-d instead of abc-abdpublic static Collection<String> expand(String start, String end, boolean requireSameLength, Collection<String> output)