|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV NEXT | ||||||||
Uses of Interface
java.util.List
| Uses of List in java.util |
| Classes in java.util that implement List | |
class |
AbstractList
A basic implementation of most of the methods in the List interface to make it easier to create a List based on a random-access data structure. |
private static class |
AbstractList.RandomAccessSubList
This class is a RandomAccess version of SubList, as required by AbstractList.subList(int, int) 55 . |
private static class |
AbstractList.SubList
This class follows the implementation requirements set forth in AbstractList.subList(int, int) 55 . |
class |
AbstractSequentialList
Abstract superclass to make it easier to implement the List interface when backed by a sequential-access store, such as a linked list. |
class |
ArrayList
An array-backed implementation of the List interface. |
private static class |
Arrays.ArrayList
Inner class used by Arrays.asList(Object[]) 55 to provide a list interface
to an array. |
private static class |
Collections.CopiesList
The implementation of Collections.nCopies(int, Object) 55 . |
private static class |
Collections.EmptyList
The implementation of Collections.EMPTY_LIST 55 . |
private static class |
Collections.SingletonList
The implementation of Collections.singletonList(Object) 55 . |
(package private) static class |
Collections.SynchronizedList
The implementation of Collections.synchronizedList(List) 55 for sequential
lists. |
private static class |
Collections.SynchronizedRandomAccessList
The implementation of Collections.synchronizedList(List) 55 for random-access
lists. |
private static class |
Collections.UnmodifiableList
The implementation of Collections.unmodifiableList(List) 55 for sequential
lists. |
private static class |
Collections.UnmodifiableRandomAccessList
The implementation of Collections.unmodifiableList(List) 55 for random-access
lists. |
class |
LinkedList
Linked list implementation of the List interface. |
class |
Stack
|
class |
Vector
The Vector classes implements growable arrays of Objects. |
| Fields in java.util declared as List | |
static List |
Collections.EMPTY_LIST
An immutable, serializable, empty List, which implements RandomAccess. |
(package private) List |
Collections.SynchronizedList.list
The wrapped list; stored both here and in the superclass to avoid excessive casting. |
(package private) List |
Collections.UnmodifiableList.list
The wrapped list; stored both here and in the superclass to avoid excessive casting. |
| Methods in java.util that return List | |
List |
List.subList(int fromIndex,
int toIndex)
Obtain a List view of a subsection of this list, from fromIndex (inclusive) to toIndex (exclusive). |
List |
AbstractList.subList(int fromIndex,
int toIndex)
Obtain a List view of a subsection of this list, from fromIndex (inclusive) to toIndex (exclusive). |
List |
Vector.subList(int fromIndex,
int toIndex)
Obtain a List view of a subsection of this list, from fromIndex (inclusive) to toIndex (exclusive). |
static List |
Collections.nCopies(int n,
java.lang.Object o)
Creates an immutable list consisting of the same object repeated n times. |
static List |
Collections.singletonList(java.lang.Object o)
Obtain an immutable List consisting of a single element. |
static List |
Collections.synchronizedList(List l)
Returns a synchronized (thread-safe) list wrapper backed by the given list. |
static List |
Collections.unmodifiableList(List l)
Returns an unmodifiable view of the given list. |
List |
Collections.CopiesList.subList(int from,
int to)
A subList is just another CopiesList. |
List |
Collections.SingletonList.subList(int from,
int to)
Sublists are limited in scope. |
List |
Collections.SynchronizedList.subList(int fromIndex,
int toIndex)
Obtain a List view of a subsection of the underlying list, from fromIndex (inclusive) to toIndex (exclusive). |
List |
Collections.SynchronizedRandomAccessList.subList(int fromIndex,
int toIndex)
Obtain a List view of a subsection of the underlying list, from fromIndex (inclusive) to toIndex (exclusive). |
List |
Collections.UnmodifiableList.subList(int fromIndex,
int toIndex)
Obtain a List view of a subsection of the underlying list, from fromIndex (inclusive) to toIndex (exclusive). |
static List |
Arrays.asList(java.lang.Object[] a)
Returns a list "view" of the specified array. |
| Methods in java.util with parameters of type List | |
private static boolean |
Collections.isSequential(List l)
Determines if a list should be treated as a sequential-access one. |
static int |
Collections.binarySearch(List l,
java.lang.Object key)
Perform a binary search of a List for a key, using the natural ordering of the elements. |
static int |
Collections.binarySearch(List l,
java.lang.Object key,
Comparator c)
Perform a binary search of a List for a key, using a supplied Comparator. |
static void |
Collections.copy(List dest,
List source)
Copy one list to another. |
static void |
Collections.fill(List l,
java.lang.Object val)
Replace every element of a list with a given value. |
static int |
Collections.indexOfSubList(List source,
List target)
Returns the starting index where the specified sublist first occurs in a larger list, or -1 if there is no matching position. |
static int |
Collections.lastIndexOfSubList(List source,
List target)
Returns the starting index where the specified sublist last occurs in a larger list, or -1 if there is no matching position. |
static boolean |
Collections.replaceAll(List list,
java.lang.Object oldval,
java.lang.Object newval)
Replace all instances of one object with another in the specified list. |
static void |
Collections.reverse(List l)
Reverse a given list. |
static void |
Collections.rotate(List list,
int distance)
Rotate the elements in a list by a specified distance. |
static void |
Collections.shuffle(List l)
Shuffle a list according to a default source of randomness. |
static void |
Collections.shuffle(List l,
Random r)
Shuffle a list according to a given source of randomness. |
static void |
Collections.sort(List l)
Sort a list according to the natural ordering of its elements. |
static void |
Collections.sort(List l,
Comparator c)
Sort a list according to a specified Comparator. |
static void |
Collections.swap(List l,
int i,
int j)
Swaps the elements at the specified positions within the list. |
static List |
Collections.synchronizedList(List l)
Returns a synchronized (thread-safe) list wrapper backed by the given list. |
static List |
Collections.unmodifiableList(List l)
Returns an unmodifiable view of the given list. |
| Constructors in java.util with parameters of type List | |
Collections.SynchronizedList(List l)
Wrap a given list. |
|
Collections.SynchronizedList(java.lang.Object sync,
List l)
Called only by trusted code to specify the mutex as well as the list. |
|
Collections.SynchronizedRandomAccessList(List l)
Wrap a given list. |
|
Collections.SynchronizedRandomAccessList(java.lang.Object sync,
List l)
Called only by trusted code to specify the mutex as well as the collection. |
|
Collections.UnmodifiableList(List l)
Wrap a given list. |
|
Collections.UnmodifiableRandomAccessList(List l)
Wrap a given list. |
|
|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV NEXT | ||||||||