The Collections Helper Class
As we mentioned above, there is a “helper” class that contains about 50 static methods and nested classes that operate on or return a Collection. Here's the API for that class Collections, simplified to omit generic parameters.
We'll first show the class, then look at generic parameters in more detail.
public class Collections extends Object { public static final Set EMPTY_SET; public static final List EMPTY_LIST; public static final Map EMPTY_MAP; public static void sort(List); public static void sort(List, Comparator); public static int binarySearch(List, Object); public static int iteratorBinarySearch(List, Object); public static int binarySearch(List, Object, Comparator); public static int ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access