Example usage for Java com.google.common.collect Lists fields, constructors, methods, implement or subclass
The text is from its open source code.
List | asList(@Nullable E first, E[] rest) Returns an unmodifiable list containing the specified first element and backed by the specified array of additional elements. |
List | asList(@Nullable E first, @Nullable E second, E[] rest) Returns an unmodifiable list containing the specified first and second element, and backed by the specified array of additional elements. |
List
| cartesianProduct(List extends List extends B>> lists) Returns every possible list that can be formed by choosing one element from each of the given lists in order; the "n-ary Cartesian product" of the lists. |
List
| cartesianProduct(List extends B>... lists) Returns every possible list that can be formed by choosing one element from each of the given lists in order; the "n-ary Cartesian product" of the lists. |
ImmutableList | charactersOf(String string) Returns a view of the specified string as an immutable list of Character values. |
List | charactersOf(CharSequence sequence) Returns a view of the specified CharSequence as a List |
ArrayList | newArrayList() Creates a mutable, empty ArrayList instance (for Java 6 and earlier). |
ArrayList | newArrayList(E... elements) Creates a mutable ArrayList instance containing the given elements. |
ArrayList | newArrayList(Iterable extends E> elements) Creates a mutable ArrayList instance containing the given elements; a very thin shortcut for creating an empty list then calling Iterables#addAll . |
ArrayList | newArrayList(Iterator extends E> elements) Creates a mutable ArrayList instance containing the given elements; a very thin shortcut for creating an empty list and then calling Iterators#addAll . |
ArrayList | newArrayListWithCapacity(int initialArraySize) Creates an ArrayList instance backed by an array with the specified initial size; simply delegates to ArrayList#ArrayList(int) . |
ArrayList | newArrayListWithExpectedSize(int estimatedSize) Creates an ArrayList instance to hold estimatedSize elements, plus an unspecified amount of padding; you almost certainly mean to call #newArrayListWithCapacity (see that method for further advice on usage). |
CopyOnWriteArrayList | newCopyOnWriteArrayList() Creates an empty CopyOnWriteArrayList instance. |
CopyOnWriteArrayList | newCopyOnWriteArrayList(Iterable extends E> elements) Creates a CopyOnWriteArrayList instance containing the given elements. |
LinkedList | newLinkedList() Creates a mutable, empty LinkedList instance (for Java 6 and earlier). |
LinkedList | newLinkedList(Iterable extends E> elements) Creates a mutable LinkedList instance containing the given elements; a very thin shortcut for creating an empty list then calling Iterables#addAll . |
List
| partition(List Returns consecutive List#subList(int,int) sublists of a list, each of the same size (the final list may be smaller). |
List | reverse(List Returns a reversed view of the specified list. |
List | transform(List Returns a list that applies function to each element of fromList . |