Interface CheckedComparator<T>

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface CheckedComparator<T>
    A Comparator that allows for checked exceptions.
    • Method Detail

      • compare

        int compare​(T o1,
                    T o2)
             throws java.lang.Throwable
        Compares its two arguments for order.
        Throws:
        java.lang.Throwable
      • sneaky

        static <T> java.util.Comparator<T> sneaky​(CheckedComparator<T> comparator)
      • unchecked

        static <T> java.util.Comparator<T> unchecked​(CheckedComparator<T> comparator)
      • unchecked

        static <T> java.util.Comparator<T> unchecked​(CheckedComparator<T> comparator,
                                                     java.util.function.Consumer<java.lang.Throwable> handler)