Package com.ibm.icu.impl
Class StringRange
java.lang.Object
com.ibm.icu.impl.StringRange
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
(package private) static final class
(package private) static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
add
(int endIndex, int startOffset, int[] starts, int[] ends, StringBuilder builder, Collection<String> output) private static LinkedList
<StringRange.Ranges> compact
(int size, Set<StringRange.Ranges> inputRanges) 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)
-
Field Details
-
DEBUG
private static final boolean DEBUG- See Also:
-
COMPARE_INT_ARRAYS
-
-
Constructor Details
-
StringRange
public StringRange()
-
-
Method Details
-
compact
public static void compact(Set<String> source, StringRange.Adder adder, boolean shorterPairs, boolean moreCompact) Compact the set of strings.- Parameters:
source
- set of stringsadder
- adds each pair to the output. See theStringRange.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.
-
compact
Faster but not as good compaction. Only looks at final codepoint.- Parameters:
source
- set of stringsadder
- adds each pair to the output. See theStringRange.Adder
interface.shorterPairs
- use abc-d instead of abc-abd
-
compact
private static LinkedList<StringRange.Ranges> compact(int size, Set<StringRange.Ranges> inputRanges) -
expand
public static Collection<String> expand(String start, String end, boolean requireSameLength, Collection<String> output) -
add
private static void add(int endIndex, int startOffset, int[] starts, int[] ends, StringBuilder builder, Collection<String> output)
-