Class StringRange

java.lang.Object
com.ibm.icu.impl.StringRange

public class StringRange extends Object
  • Field Details

  • 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 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
    • 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)