<Comparable<? super Comparable<? super T>>> void java.util.Collections.sort(List<Comparable<? super Comparable<? super T>>> list)
升序排列List中的元素。
<T> void java.util.Collections.sort(List<Student> list, Comparator<? super T> c)
使用Comparator升序排列List中的元素。
static int frequency(Collection<?> c, Object o)
返回集合中某元素的出现次数。
T max(Collection<? extends T> coll)
返回最大的元素。
static <T> T min(Collection<? extends T> coll, Comparator<? super T> comp)
返回最小的元素。
static <T> Comparator<T> reverseOrder()
返回一个Comparator,行为与原Comparable相反。
static void reverse(List<?> list)
反转List中的元素。
Reverses the order of the elements in the specified list.
static void rotate(List<?> list, int distance)
旋转list中的元素。即list=[t, a, n, k, s]. After invoking Collections.rotate(list, 1) (or Collections.rotate(list, -4)), list will comprise [s, t, a, n, k].
static void shuffle(List<?> list)
对list元素乱序重排,洗牌的效果。
static <T> int binarySearch(List<? extends Comparable<? super T>> list, T key)
要求List中元素已经升序排列。找不到返回负数。
<T> List<T> java.util.Collections.nCopies(int n, T o)
返回含有指定对象n份拷贝的不可变list。注意是浅拷贝。