java.lang.Object
com.inductiveautomation.ignition.common.util.Comparators

public final class Comparators extends Object
Utility to perform string comparisons that sort in a human-readable order (e.g. 1, 2, 10) rather than lexicographically (1, 10, 2).
  • Method Details

    • alphaNumeric

      public static Comparator<CharSequence> alphaNumeric()
      Returns:
      a new, case insensitive alphanumeric comparator.
    • alphaNumeric

      public static Comparator<CharSequence> alphaNumeric(boolean caseSensitive)
    • alphaNumeric

      public static <T> Comparator<T> alphaNumeric(Function<T,CharSequence> toString)
      Returns:
      a new, case insensitive alphanumeric comparator using the given charsequence extractor function.
    • alphaNumeric

      public static <T> Comparator<T> alphaNumeric(Function<T,CharSequence> toStringFn, boolean caseSensitive)