Class Lists
java.lang.Object
org.glassfish.jersey.internal.guava.Lists
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> ArrayList<E> newArrayList(Iterable<? extends E> elements) Creates a mutableArrayListinstance containing the given elements; a very thin shortcut for creating an empty list then calling.invalid reference
Iterables#addAllstatic <E> ArrayList<E> newArrayList(Iterator<? extends E> elements) Creates a mutableArrayListinstance containing the given elements; a very thin shortcut for creating an empty list and then callingIterators.addAll(Collection, Iterator).
-
Method Details
-
newArrayList
Creates a mutableArrayListinstance containing the given elements; a very thin shortcut for creating an empty list then calling.invalid reference
Iterables#addAllNote: if mutability is not required and the elements are non-null, use
instead. (Or, changeinvalid reference
ImmutableList#copyOf(Iterable)elementsto be aand callinvalid reference
FluentIterableelements.toList().)Note for Java 7 and later: if
elementsis aCollection, you don't need this method. Use theArrayListconstructor directly, taking advantage of the new "diamond" syntax. -
newArrayList
Creates a mutableArrayListinstance containing the given elements; a very thin shortcut for creating an empty list and then callingIterators.addAll(Collection, Iterator).Note: if mutability is not required and the elements are non-null, use
instead.invalid reference
ImmutableList#copyOf(Iterator)
-