Class StringRange


  • public class StringRange
    extends Object
    • Field Detail

      • COMPARE_INT_ARRAYS

        public static final Comparator<int[]> COMPARE_INT_ARRAYS
    • Constructor Detail

      • StringRange

        public StringRange()
    • Method Detail

      • compact

        public static void compact​(Set<String> source,
                                   StringRange.Adder adder,
                                   boolean shorterPairs,
                                   boolean moreCompact)
        Compact the set of strings.
        Parameters:
        source - set of strings
        adder - adds each pair to the output. See the StringRange.Adder interface.
        shorterPairs - use abc-d instead of abc-abd
        moreCompact - use a more compact form, at the expense of more processing. If false, source must be sorted.
      • compact

        public static void compact​(Set<String> source,
                                   StringRange.Adder adder,
                                   boolean shorterPairs)
        Faster but not as good compaction. Only looks at final codepoint.
        Parameters:
        source - set of strings
        adder - adds each pair to the output. See the StringRange.Adder interface.
        shorterPairs - use abc-d instead of abc-abd