## Uses of Interface
java.util.List

- Packages that use List
  Package | Description
  --- | ---
  java.lang.invoke |
  java.net |
  java.util |
  java.util.concurrent | Utility classes commonly useful in concurrent programming.
  java.util.stream | Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

- - ### Uses of List in java.lang.invoke

    Methods in java.lang.invoke that return List
    Modifier and Type | Method and Description
    --- | ---
    `List<Class<?>>` | MethodType.`parameterList()` Presents the parameter types as a list (a convenience method).

    Methods in java.lang.invoke with parameters of type List
    Modifier and Type | Method and Description
    --- | ---
    `MethodType` | MethodType.`appendParameterTypes(List<Class<?>> ptypesToInsert)` Finds or creates a method type with additional parameter types.
    `MethodType` | MethodType.`insertParameterTypes(int num, List<Class<?>> ptypesToInsert)` Finds or creates a method type with additional parameter types.
    `Object` | MethodHandle.`invokeWithArguments(List<?> arguments)` Performs a variable arity invocation, passing the arguments in the given array to the method handle, as if via an inexact `invoke` from a call site which mentions only the type `Object`, and whose arity is the length of the argument array.
    `static MethodType` | MethodType.`methodType(Class<?> rtype, List<Class<?>> ptypes)` Finds or creates a method type with the given components.

  - ### Uses of List in java.net

    Methods in java.net that return types with arguments of type List
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,List<String>>` | URLConnection.`getHeaderFields()` Returns an unmodifiable Map of the header fields.
    `Map<String,List<String>>` | URLConnection.`getRequestProperties()` Returns an unmodifiable Map of general request properties for this connection.

  - ### Uses of List in java.util

    Classes in java.util that implement List
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AbstractList<E>` This class provides a skeletal implementation of the `List` interface to minimize the effort required to implement this interface backed by a "random access" data store (such as an array).
    `class` | `AbstractSequentialList<E>` This class provides a skeletal implementation of the `List` interface to minimize the effort required to implement this interface backed by a "sequential access" data store (such as a linked list).
    `class` | `ArrayList<E>` Resizable-array implementation of the `List` interface.
    `class` | `LinkedList<E>` Doubly-linked list implementation of the `List` and `Deque` interfaces.
    `class` | `Stack<E>` The `Stack` class represents a last-in-first-out (LIFO) stack of objects.
    `class` | `Vector<E>` The `Vector` class implements a growable array of objects.

    Fields in java.util declared as List
    Modifier and Type | Field and Description
    --- | ---
    `static List` | Collections.`EMPTY_LIST` The empty list (immutable).
    `static List<String>` | ResourceBundle.Control.`FORMAT_CLASS` The class-only format `List` containing `"java.class"`.
    `static List<String>` | ResourceBundle.Control.`FORMAT_DEFAULT` The default format `List`, which contains the strings `"java.class"` and `"java.properties"`, in this order.
    `static List<String>` | ResourceBundle.Control.`FORMAT_PROPERTIES` The properties-only format `List` containing `"java.properties"`.

    Methods in java.util that return List
    Modifier and Type | Method and Description
    --- | ---
    `static <T> List<T>` | Arrays.`asList(T... a)` Returns a fixed-size list backed by the specified array.
    `static <E> List<E>` | Collections.`checkedList(List<E> list, Class<E> type)` Returns a dynamically typesafe view of the specified list.
    `static <T> List<T>` | Collections.`emptyList()` Returns the empty list (immutable).
    `List<Locale>` | ResourceBundle.Control.`getCandidateLocales(String baseName, Locale locale)` Returns a `List` of `Locale`s as candidate locales for `baseName` and `locale`.
    `List<String>` | ResourceBundle.Control.`getFormats(String baseName)` Returns a `List` of `String`s containing formats to be used to load resource bundles for the given `baseName`.
    `static <T> List<T>` | Collections.`nCopies(int n, T o)` Returns an immutable list consisting of `n` copies of the specified object.
    `static <T> List<T>` | Collections.`singletonList(T o)` Returns an immutable list containing only the specified object.
    `List<E>` | Vector.`subList(int fromIndex, int toIndex)` Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
    `List<E>` | List.`subList(int fromIndex, int toIndex)` Returns a view of the portion of this list between the specified `fromIndex`, inclusive, and `toIndex`, exclusive.
    `List<E>` | ArrayList.`subList(int fromIndex, int toIndex)` Returns a view of the portion of this list between the specified `fromIndex`, inclusive, and `toIndex`, exclusive.
    `List<E>` | AbstractList.`subList(int fromIndex, int toIndex)` Returns a view of the portion of this list between the specified `fromIndex`, inclusive, and `toIndex`, exclusive.
    `static <T> List<T>` | Collections.`synchronizedList(List<T> list)` Returns a synchronized (thread-safe) list backed by the specified list.
    `static <T> List<T>` | Collections.`unmodifiableList(List<? extends T> list)` Returns an unmodifiable view of the specified list.

    Methods in java.util with parameters of type List
    Modifier and Type | Method and Description
    --- | ---
    `static <T> int` | Collections.`binarySearch(List<? extends Comparable<? super T>> list, T key)` Searches the specified list for the specified object using the binary search algorithm.
    `static <T> int` | Collections.`binarySearch(List<? extends T> list, T key, Comparator<? super T> c)` Searches the specified list for the specified object using the binary search algorithm.
    `static <E> List<E>` | Collections.`checkedList(List<E> list, Class<E> type)` Returns a dynamically typesafe view of the specified list.
    `static <T> void` | Collections.`copy(List<? super T> dest, List<? extends T> src)` Copies all of the elements from one list into another.
    `static <T> void` | Collections.`copy(List<? super T> dest, List<? extends T> src)` Copies all of the elements from one list into another.
    `static <T> void` | Collections.`fill(List<? super T> list, T obj)` Replaces all of the elements of the specified list with the specified element.
    `static ResourceBundle.Control` | ResourceBundle.Control.`getControl(List<String> formats)` Returns a `ResourceBundle.Control` in which the `getFormats` method returns the specified `formats`.
    `static ResourceBundle.Control` | ResourceBundle.Control.`getNoFallbackControl(List<String> formats)` Returns a `ResourceBundle.Control` in which the `getFormats` method returns the specified `formats` and the `getFallbackLocale` method returns `null`.
    `static int` | Collections.`indexOfSubList(List<?> source, List<?> target)` Returns the starting position of the first occurrence of the specified target list within the specified source list, or -1 if there is no such occurrence.
    `static int` | Collections.`indexOfSubList(List<?> source, List<?> target)` Returns the starting position of the first occurrence of the specified target list within the specified source list, or -1 if there is no such occurrence.
    `static int` | Collections.`lastIndexOfSubList(List<?> source, List<?> target)` Returns the starting position of the last occurrence of the specified target list within the specified source list, or -1 if there is no such occurrence.
    `static int` | Collections.`lastIndexOfSubList(List<?> source, List<?> target)` Returns the starting position of the last occurrence of the specified target list within the specified source list, or -1 if there is no such occurrence.
    `static <T> boolean` | Collections.`replaceAll(List<T> list, T oldVal, T newVal)` Replaces all occurrences of one specified value in a list with another.
    `static void` | Collections.`reverse(List<?> list)` Reverses the order of the elements in the specified list.
    `static void` | Collections.`rotate(List<?> list, int distance)` Rotates the elements in the specified list by the specified distance.
    `static void` | Collections.`shuffle(List<?> list)` Randomly permutes the specified list using a default source of randomness.
    `static void` | Collections.`shuffle(List<?> list, Random rnd)` Randomly permute the specified list using the specified source of randomness.
    `static <T extends Comparable<? super T>> void` | Collections.`sort(List<T> list)` Sorts the specified list into ascending order, according to the natural ordering of its elements.
    `static <T> void` | Collections.`sort(List<T> list, Comparator<? super T> c)` Sorts the specified list according to the order induced by the specified comparator.
    `static void` | Collections.`swap(List<?> list, int i, int j)` Swaps the elements at the specified positions in the specified list.
    `static <T> List<T>` | Collections.`synchronizedList(List<T> list)` Returns a synchronized (thread-safe) list backed by the specified list.
    `static <T> List<T>` | Collections.`unmodifiableList(List<? extends T> list)` Returns an unmodifiable view of the specified list.

  - ### Uses of List in java.util.concurrent

    Classes in java.util.concurrent that implement List
    Modifier and Type | Class and Description
    --- | ---
    `class` | `CopyOnWriteArrayList<E>` A thread-safe variant of `ArrayList` in which all mutative operations (`add`, `set`, and so on) are implemented by making a fresh copy of the underlying array.

    Methods in java.util.concurrent that return List
    Modifier and Type | Method and Description
    --- | ---
    `<T> List<Future<T>>` | ForkJoinPool.`invokeAll(Collection<? extends Callable<T>> tasks)`
    `<T> List<Future<T>>` | ExecutorService.`invokeAll(Collection<? extends Callable<T>> tasks)` Executes the given tasks, returning a list of Futures holding their status and results when all complete.
    `<T> List<Future<T>>` | AbstractExecutorService.`invokeAll(Collection<? extends Callable<T>> tasks)`
    `<T> List<Future<T>>` | ExecutorService.`invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)` Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.
    `<T> List<Future<T>>` | AbstractExecutorService.`invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)`
    `List<Runnable>` | ThreadPoolExecutor.`shutdownNow()` Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
    `List<Runnable>` | ScheduledThreadPoolExecutor.`shutdownNow()` Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
    `List<Runnable>` | ForkJoinPool.`shutdownNow()` Attempts to cancel and/or stop all tasks, and reject all subsequently submitted tasks.
    `List<Runnable>` | ExecutorService.`shutdownNow()` Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
    `List<E>` | CopyOnWriteArrayList.`subList(int fromIndex, int toIndex)` Returns a view of the portion of this list between `fromIndex`, inclusive, and `toIndex`, exclusive.

  - ### Uses of List in java.util.stream

    Methods in java.util.stream that return types with arguments of type List
    Modifier and Type | Method and Description
    --- | ---
    `static <T,K> Collector<T,?,Map<K,List<T>>>` | Collectors.`groupingBy(Function<? super T,? extends K> classifier)` Returns a `Collector` implementing a "group by" operation on input elements of type `T`, grouping elements according to a classification function, and returning the results in a `Map`.
    `static <T,K> Collector<T,?,ConcurrentMap<K,List<T>>>` | Collectors.`groupingByConcurrent(Function<? super T,? extends K> classifier)` Returns a concurrent `Collector` implementing a "group by" operation on input elements of type `T`, grouping elements according to a classification function.
    `static <T> Collector<T,?,Map<Boolean,List<T>>>` | Collectors.`partitioningBy(Predicate<? super T> predicate)` Returns a `Collector` which partitions the input elements according to a `Predicate`, and organizes them into a `Map<Boolean, List<T>>`.
    `static <T> Collector<T,?,List<T>>` | Collectors.`toList()` Returns a `Collector` that accumulates the input elements into a new `List`.

Copyright © 2025 API Design. All Rights Reserved.