public final class Lists extends Object
com.google.common.collect.Lists.| Modifier | Constructor and Description |
|---|---|
private |
Lists()
Hidden for pure static factory.
|
| Modifier and Type | Method and Description |
|---|---|
private static <T> Collection<T> |
cast(Iterable<T> iterable)
Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557 problem.
|
static <E> List<E> |
newArrayList()
Creates a mutable, empty
ArrayList instance. |
static <E> List<E> |
newArrayList(E... elements)
Creates a mutable
ArrayList instance containing the given elements. |
static <E> List<E> |
newArrayList(Iterable<? extends E> elements)
Creates a mutable
ArrayList instance containing the given elements. |
static <E> List<E> |
newArrayList(Iterator<? extends E> elements)
Creates a mutable
ArrayList instance containing the given elements. |
public static <E> List<E> newArrayList()
ArrayList instance.E - type of elementsArrayListprivate static <T> Collection<T> cast(Iterable<T> iterable)
T - type of elementsiterable - iterable to castpublic static <E> List<E> newArrayList(Iterable<? extends E> elements)
ArrayList instance containing the given elements.E - type of elementselements - the elements that the list should contain, in orderArrayList containing those elementspublic static <E> List<E> newArrayList(Iterator<? extends E> elements)
ArrayList instance containing the given elements.E - type of elementselements - the elements that the list should contain, in orderArrayList containing those elements@SafeVarargs public static <E> List<E> newArrayList(E... elements)
ArrayList instance containing the given elements.E - type of elementselements - the elements that the list should contain, in orderArrayList containing those elementsCopyright © 2014 Sven Strittmatter. All Rights Reserved.