edu.emory.mathcs.backport.java.util
Class Collections
public
class
Collections
extends Object
Augments java.util.Collections with methods added in Java 5.0
and higher. Adds support for dynamically typesafe collection wrappers,
and several utility methods.
See Also: java.util.Collections
Method Summary |
static boolean | addAll(Collection c, Object[] a) |
static Queue | asLifoQueue(Deque deque) |
static int | binarySearch(List list, Object key) |
static int | binarySearch(List list, Object key, Comparator c) |
static Collection | checkedCollection(Collection c, Class type) |
static List | checkedList(List l, Class type) |
static Map | checkedMap(Map m, Class keyType, Class valueType) |
static Set | checkedSet(Set s, Class type) |
static SortedMap | checkedSortedMap(SortedMap m, Class keyType, Class valueType) |
static SortedSet | checkedSortedSet(SortedSet s, Class type) |
static void | copy(List dest, List src) |
static boolean | disjoint(Collection a, Collection b) |
static List | emptyList() |
static Map | emptyMap() |
static Set | emptySet() |
static Enumeration | enumeration(Collection c) |
static void | fill(List list, Object obj) |
static int | frequency(Collection c, Object o) |
static int | indexOfSubList(List source, List target) |
static int | lastIndexOfSubList(List source, List target) |
static ArrayList | list(Enumeration e) |
static Object | max(Collection coll) |
static Object | max(Collection coll, Comparator comp) |
static Object | min(Collection coll) |
static Object | min(Collection coll, Comparator comp) |
static List | nCopies(int n, Object o) |
static Set | newSetFromMap(Map map) |
static boolean | replaceAll(List list, Object oldVal, Object newVal) |
static void | reverse(List list) |
static Comparator | reverseOrder() |
static Comparator | reverseOrder(Comparator cmp) |
static void | rotate(List list, int distance) |
static void | shuffle(List list) |
static void | shuffle(List list, Random rnd) |
static Set | singleton(Object o) |
static List | singletonList(Object o) |
static Map | singletonMap(Object key, Object value) |
static void | sort(List list) |
static void | sort(List list, Comparator c) |
static void | swap(List list, int i, int j) |
static Collection | synchronizedCollection(Collection c) |
static List | synchronizedList(List l) |
static Map | synchronizedMap(Map m) |
static Set | synchronizedSet(Set s) |
static SortedMap | synchronizedSortedMap(SortedMap m) |
static SortedSet | synchronizedSortedSet(SortedSet s) |
static Collection | unmodifiableCollection(Collection c) |
static List | unmodifiableList(List l) |
static Map | unmodifiableMap(Map m) |
static Set | unmodifiableSet(Set s) |
static SortedMap | unmodifiableSortedMap(SortedMap m) |
static SortedSet | unmodifiableSortedSet(SortedSet s) |
public static boolean addAll(Collection c, Object[] a)
public static int binarySearch(List list, Object key)
public static int binarySearch(List list, Object key, Comparator c)
public static Collection checkedCollection(Collection c, Class type)
public static List checkedList(List l, Class type)
public static Map checkedMap(Map m, Class keyType, Class valueType)
public static Set checkedSet(Set s, Class type)
public static SortedMap checkedSortedMap(SortedMap m, Class keyType, Class valueType)
public static SortedSet checkedSortedSet(SortedSet s, Class type)
public static void copy(List dest, List src)
public static boolean disjoint(Collection a, Collection b)
public static List emptyList()
public static Map emptyMap()
public static Set emptySet()
public static Enumeration enumeration(Collection c)
public static void fill(List list, Object obj)
public static int frequency(Collection c, Object o)
public static int indexOfSubList(List source, List target)
public static int lastIndexOfSubList(List source, List target)
public static ArrayList list(Enumeration e)
public static Object max(Collection coll)
public static Object max(Collection coll, Comparator comp)
public static Object min(Collection coll)
public static Object min(Collection coll, Comparator comp)
public static List nCopies(int n, Object o)
public static Set newSetFromMap(Map map)
public static boolean replaceAll(List list, Object oldVal, Object newVal)
public static void reverse(List list)
public static Comparator reverseOrder()
public static Comparator reverseOrder(Comparator cmp)
public static void rotate(List list, int distance)
public static void shuffle(List list)
public static void shuffle(List list, Random rnd)
public static Set singleton(Object o)
public static List singletonList(Object o)
public static Map singletonMap(Object key, Object value)
public static void sort(List list)
public static void sort(List list, Comparator c)
public static void swap(List list, int i, int j)
public static Collection synchronizedCollection(Collection c)
public static List synchronizedList(List l)
public static Map synchronizedMap(Map m)
public static Set synchronizedSet(Set s)
public static SortedMap synchronizedSortedMap(SortedMap m)
public static SortedSet synchronizedSortedSet(SortedSet s)
public static Collection unmodifiableCollection(Collection c)
public static List unmodifiableList(List l)
public static Map unmodifiableMap(Map m)
public static Set unmodifiableSet(Set s)
public static SortedMap unmodifiableSortedMap(SortedMap m)
public static SortedSet unmodifiableSortedSet(SortedSet s)