@Test public void testNullsLastComparator() { Stream.of("abc", "ab", null, "abcd", null, "a") .sorted(ComparatorCompat.nullsLast(String.CASE_INSENSITIVE_ORDER)) .custom(assertElements(contains( "a", "ab", "abc", "abcd", null, null ))); }
@NotNull public static <T> ComparatorCompat<T> nullsLast() { return nullsComparator(false, null); }
ComparatorCompat implements Comparator<T> { @NotNull public static <T> ComparatorCompat<T> nullsLast() { return nullsComparator(false, null); } }
ComparatorCompat implements Comparator<T> { @NotNull public static <T> ComparatorCompat<T> nullsLast() { return nullsComparator(false, null); } ComparatorCompat(@NotNull Comparator<? super T> comparator); }
ComparatorCompat implements Comparator<T> { @NotNull public static <T> ComparatorCompat<T> nullsLast() { return nullsComparator(false, null); } ComparatorCompat(@NotNull Comparator<? super T> comparator); @NotNull @SuppressWarnings("unchecked") static ComparatorCompat<T> naturalOrder(); @NotNull @SuppressWarnings("unchecked") static ComparatorCompat<T> reverseOrder(); @NotNull static Comparator<T> reversed(@Nullable Comparator<T> comparator); @NotNull static Comparator<T> thenComparing(
            @NotNull final Comparator<? super T> c1,
            @NotNull final Comparator<? super T> c2); @NotNull static ComparatorCompat<T> comparing(
            @NotNull final Function<? super T, ? extends U> keyExtractor,
            @NotNull final Comparator<? super U> keyComparator); @NotNull static ComparatorCompat<T> comparing(
            @NotNull final Function<? super T, ? extends U> keyExtractor); @NotNull static ComparatorCompat<T> comparingInt(
            @NotNull final ToIntFunction<? super T> keyExtractor); @NotNull static ComparatorCompat<T> comparingLong(
            @NotNull final ToLongFunction<? super T> keyExtractor); @NotNull static ComparatorCompat<T> comparingDouble(
            @NotNull final ToDoubleFunction<? super T> keyExtractor); @NotNull static ComparatorCompat<T> nullsFirst(); @NotNull static ComparatorCompat<T> nullsFirst(@Nullable Comparator<? super T> comparator); @NotNull static ComparatorCompat<T> nullsLast(); @NotNull static ComparatorCompat<T> nullsLast(@Nullable Comparator<? super T> comparator); @NotNull static ComparatorCompat<T> chain(@NotNull Comparator<T> comparator); @NotNull ComparatorCompat<T> reversed(); @NotNull ComparatorCompat<T> thenComparing(@NotNull final Comparator<? super T> other); @NotNull ComparatorCompat<T> thenComparing(
            @NotNull Function<? super T, ? extends U> keyExtractor,
            @NotNull Comparator<? super U> keyComparator); @NotNull ComparatorCompat<T> thenComparing(
            @NotNull Function<? super T, ? extends U> keyExtractor); @NotNull ComparatorCompat<T> thenComparingInt(@NotNull ToIntFunction<? super T> keyExtractor); @NotNull ComparatorCompat<T> thenComparingLong(@NotNull ToLongFunction<? super T> keyExtractor); @NotNull ComparatorCompat<T> thenComparingDouble(@NotNull ToDoubleFunction<? super T> keyExtractor); @NotNull @SuppressWarnings("unchecked") Comparator<T> comparator(); @Override int compare(T o1, T o2); }
ComparatorCompat implements Comparator<T> { @NotNull public static <T> ComparatorCompat<T> nullsLast() { return nullsComparator(false, null); } ComparatorCompat(@NotNull Comparator<? super T> comparator); @NotNull @SuppressWarnings("unchecked") static ComparatorCompat<T> naturalOrder(); @NotNull @SuppressWarnings("unchecked") static ComparatorCompat<T> reverseOrder(); @NotNull static Comparator<T> reversed(@Nullable Comparator<T> comparator); @NotNull static Comparator<T> thenComparing(
            @NotNull final Comparator<? super T> c1,
            @NotNull final Comparator<? super T> c2); @NotNull static ComparatorCompat<T> comparing(
            @NotNull final Function<? super T, ? extends U> keyExtractor,
            @NotNull final Comparator<? super U> keyComparator); @NotNull static ComparatorCompat<T> comparing(
            @NotNull final Function<? super T, ? extends U> keyExtractor); @NotNull static ComparatorCompat<T> comparingInt(
            @NotNull final ToIntFunction<? super T> keyExtractor); @NotNull static ComparatorCompat<T> comparingLong(
            @NotNull final ToLongFunction<? super T> keyExtractor); @NotNull static ComparatorCompat<T> comparingDouble(
            @NotNull final ToDoubleFunction<? super T> keyExtractor); @NotNull static ComparatorCompat<T> nullsFirst(); @NotNull static ComparatorCompat<T> nullsFirst(@Nullable Comparator<? super T> comparator); @NotNull static ComparatorCompat<T> nullsLast(); @NotNull static ComparatorCompat<T> nullsLast(@Nullable Comparator<? super T> comparator); @NotNull static ComparatorCompat<T> chain(@NotNull Comparator<T> comparator); @NotNull ComparatorCompat<T> reversed(); @NotNull ComparatorCompat<T> thenComparing(@NotNull final Comparator<? super T> other); @NotNull ComparatorCompat<T> thenComparing(
            @NotNull Function<? super T, ? extends U> keyExtractor,
            @NotNull Comparator<? super U> keyComparator); @NotNull ComparatorCompat<T> thenComparing(
            @NotNull Function<? super T, ? extends U> keyExtractor); @NotNull ComparatorCompat<T> thenComparingInt(@NotNull ToIntFunction<? super T> keyExtractor); @NotNull ComparatorCompat<T> thenComparingLong(@NotNull ToLongFunction<? super T> keyExtractor); @NotNull ComparatorCompat<T> thenComparingDouble(@NotNull ToDoubleFunction<? super T> keyExtractor); @NotNull @SuppressWarnings("unchecked") Comparator<T> comparator(); @Override int compare(T o1, T o2);  }