@Test public void testShouldSortIntegersWithNaturalComparator() throws Exception { final List<Integer> list = generateUniqueIntList(100); java.util.Collections.sort(list, naturalComparator()); assertListSorted(list, naturalComparator()); }
@Nonnull public static <T extends Comparable> Comparator<T> naturalComparator() { return (Comparator<T>) naturalComparator; }
Collections { @Nonnull public static <T extends Comparable> Comparator<T> naturalComparator() { return (Comparator<T>) naturalComparator; } }
Collections { @Nonnull public static <T extends Comparable> Comparator<T> naturalComparator() { return (Comparator<T>) naturalComparator; } protected  Collections(); }
Collections { @Nonnull public static <T extends Comparable> Comparator<T> naturalComparator() { return (Comparator<T>) naturalComparator; } protected  Collections(); @Nonnull static String toString(@Nonnull Collection<Object> objects, @Nonnull String separator); static boolean notEmpty(@Nullable Collection<?> c); static boolean isEmpty(@Nullable Collection<?> c); static boolean isEmpty(@Nullable Object[] array); @Nonnull static Collection<T> setNotNull(@Nullable Collection<T> c, @Nonnull Collection<T> defaultValue); static void addUnique(@Nonnull List<T> list, @Nonnull List<T> list2); static void addUnique(@Nonnull List<T> list, @Nonnull T object); @Nonnull static List<Selectable<T>> selectable(@Nonnull List<T> list); static Map<K, V> subtract(final Map<K, V> m1, final Map<K, V> m2); @Nullable static T getFirstListElement(List<? extends T> list); @Nullable static T getFirstCollectionElement(Collection<? extends T> collection); static T getLastListElement(List<? extends T> list); static void removeEntriesByKeys(Map<T, ?> map, List<T> keys); static boolean isEmpty(@Nullable Map map); static Set<T> getKeysByValue(Map<T, E> map, E value); static boolean contains(@Nonnull T value, @Nullable Collection<T> list, @Nonnull Equalizer<T> equalizer); static boolean notContains(@Nonnull T value, @Nullable Collection<T> list, @Nonnull Equalizer<T> equalizer); static boolean contains(@Nonnull T value, @Nullable Collection<T> list, @Nonnull FilterType filterType, @Nullable Equalizer<T> equalizer); static boolean contains(@Nullable Collection<T> list, @Nonnull FilterType filterType, @Nonnull JPredicate<T> finder); @Nullable static T find(@Nonnull T value, @Nullable Collection<T> list, @Nullable Equalizer<T> equalizer); static T find(@Nullable Collection<T> list, @Nonnull JPredicate<T> finder); @Nullable static T removeFirst(@Nullable Collection<T> list, @Nonnull JPredicate<T> finder); @Nonnull static List<T> removeAll(@Nullable Collection<T> list, @Nonnull JPredicate<T> finder); static boolean contains(@Nonnull T value, @Nonnull FilterType filterType, @Nullable Collection<T> list); static boolean contains(@Nonnull T value, @Nullable Collection<T> list); static boolean contains(@Nonnull T value, @Nullable T... array); static List<T> toIdsList(@Nonnull Collection<? extends Identifiable<T>> list); static List<String> toStringList(@Nonnull List<? extends Enum> idsList); @Nonnull static List<T> asList(T... ts); static SortedMap<T, V> toSortedMap(@Nonnull Map<T, V> map, @Nullable Comparator<? super T> comparator); static Iterable<T> reversed(@Nonnull List<T> list); static Iterable<T> reversed(@Nonnull T[] array); static boolean removeIf(@Nonnull Iterator<T> removeFrom,
									   @Nonnull JPredicate<? super T> predicate); @Nullable static T find(@Nonnull Iterator<T> iterator,
							 @Nonnull JPredicate<? super T> predicate); @Nonnull static T[] concat(@Nonnull T[] first, @Nonnull T[] second); @Nonnull static byte[] concat(@Nonnull byte[] first, @Nonnull byte[] second); @Nonnull static List<List<E>> split(@Nonnull List<E> list, int chunkSize); @Nonnull static Comparator<T> naturalComparator(); @Nonnull static Comparator<T> reversedNaturalComparator(); @Nonnull static Comparator<T> reversed(@Nonnull final Comparator<? super T> comparator); }
Collections { @Nonnull public static <T extends Comparable> Comparator<T> naturalComparator() { return (Comparator<T>) naturalComparator; } protected  Collections(); @Nonnull static String toString(@Nonnull Collection<Object> objects, @Nonnull String separator); static boolean notEmpty(@Nullable Collection<?> c); static boolean isEmpty(@Nullable Collection<?> c); static boolean isEmpty(@Nullable Object[] array); @Nonnull static Collection<T> setNotNull(@Nullable Collection<T> c, @Nonnull Collection<T> defaultValue); static void addUnique(@Nonnull List<T> list, @Nonnull List<T> list2); static void addUnique(@Nonnull List<T> list, @Nonnull T object); @Nonnull static List<Selectable<T>> selectable(@Nonnull List<T> list); static Map<K, V> subtract(final Map<K, V> m1, final Map<K, V> m2); @Nullable static T getFirstListElement(List<? extends T> list); @Nullable static T getFirstCollectionElement(Collection<? extends T> collection); static T getLastListElement(List<? extends T> list); static void removeEntriesByKeys(Map<T, ?> map, List<T> keys); static boolean isEmpty(@Nullable Map map); static Set<T> getKeysByValue(Map<T, E> map, E value); static boolean contains(@Nonnull T value, @Nullable Collection<T> list, @Nonnull Equalizer<T> equalizer); static boolean notContains(@Nonnull T value, @Nullable Collection<T> list, @Nonnull Equalizer<T> equalizer); static boolean contains(@Nonnull T value, @Nullable Collection<T> list, @Nonnull FilterType filterType, @Nullable Equalizer<T> equalizer); static boolean contains(@Nullable Collection<T> list, @Nonnull FilterType filterType, @Nonnull JPredicate<T> finder); @Nullable static T find(@Nonnull T value, @Nullable Collection<T> list, @Nullable Equalizer<T> equalizer); static T find(@Nullable Collection<T> list, @Nonnull JPredicate<T> finder); @Nullable static T removeFirst(@Nullable Collection<T> list, @Nonnull JPredicate<T> finder); @Nonnull static List<T> removeAll(@Nullable Collection<T> list, @Nonnull JPredicate<T> finder); static boolean contains(@Nonnull T value, @Nonnull FilterType filterType, @Nullable Collection<T> list); static boolean contains(@Nonnull T value, @Nullable Collection<T> list); static boolean contains(@Nonnull T value, @Nullable T... array); static List<T> toIdsList(@Nonnull Collection<? extends Identifiable<T>> list); static List<String> toStringList(@Nonnull List<? extends Enum> idsList); @Nonnull static List<T> asList(T... ts); static SortedMap<T, V> toSortedMap(@Nonnull Map<T, V> map, @Nullable Comparator<? super T> comparator); static Iterable<T> reversed(@Nonnull List<T> list); static Iterable<T> reversed(@Nonnull T[] array); static boolean removeIf(@Nonnull Iterator<T> removeFrom,
									   @Nonnull JPredicate<? super T> predicate); @Nullable static T find(@Nonnull Iterator<T> iterator,
							 @Nonnull JPredicate<? super T> predicate); @Nonnull static T[] concat(@Nonnull T[] first, @Nonnull T[] second); @Nonnull static byte[] concat(@Nonnull byte[] first, @Nonnull byte[] second); @Nonnull static List<List<E>> split(@Nonnull List<E> list, int chunkSize); @Nonnull static Comparator<T> naturalComparator(); @Nonnull static Comparator<T> reversedNaturalComparator(); @Nonnull static Comparator<T> reversed(@Nonnull final Comparator<? super T> comparator);  }