|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jdroid.java.collections.Lists
public class Lists
| Constructor Summary | |
|---|---|
Lists()
|
|
| Method Summary | ||
|---|---|---|
static
|
filter(List<T> unfilteredList,
Predicate<T> predicate)
|
|
static Boolean |
isNullOrEmpty(List<?> list)
|
|
static
|
newArrayList()
Creates a mutable, empty ArrayList instance. |
|
static
|
newArrayList(E... elements)
Creates a mutable ArrayList instance containing the given elements. |
|
static
|
newArrayList(Iterable<? extends E> elements)
Creates a mutable ArrayList instance containing the given elements. |
|
static
|
newArrayList(Iterator<? extends E> elements)
Creates a mutable ArrayList instance containing the given elements. |
|
static
|
newLinkedList()
Creates an empty LinkedList instance. |
|
static
|
newLinkedList(Iterable<? extends E> elements)
Creates a LinkedList instance containing the given elements. |
|
static
|
safeArrayList(List<E> list)
|
|
static
|
trim(List<T> list,
int maxCount)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Lists()
| Method Detail |
|---|
public static <E> ArrayList<E> newArrayList()
ArrayList instance.
ArrayListpublic static <E> ArrayList<E> newArrayList(E... elements)
ArrayList instance containing the given elements.
elements - the elements that the list should contain, in order
ArrayList containing those elementspublic static <E> List<E> safeArrayList(List<E> list)
public static <E> ArrayList<E> newArrayList(Iterable<? extends E> elements)
ArrayList instance containing the given elements.
elements - the elements that the list should contain, in order
ArrayList containing those elementspublic static <E> ArrayList<E> newArrayList(Iterator<? extends E> elements)
ArrayList instance containing the given elements.
elements - the elements that the list should contain, in order
ArrayList containing those elementspublic static <E> LinkedList<E> newLinkedList()
LinkedList instance.
LinkedListpublic static <E> LinkedList<E> newLinkedList(Iterable<? extends E> elements)
LinkedList instance containing the given elements.
elements - the elements that the list should contain, in order
LinkedList containing those elements
public static <T> List<T> trim(List<T> list,
int maxCount)
list - maxCount -
public static Boolean isNullOrEmpty(List<?> list)
public static <T> List<T> filter(List<T> unfilteredList,
Predicate<T> predicate)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||