public final class ListFactory extends Object
ListFactory provides factory methods for create new Map objects| Constructor and Description |
|---|
ListFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
newArrayList(Collection<T> collection,
T... elements)
Factory method for create new
ArrayList from the given optional collection and the
given optional elements. |
static <T> List<T> |
newArrayList(Iterable<T> iterable,
T... elements)
Factory method for create new
ArrayList from the given optional iterable and the
given optional elements. |
static <T> List<T> |
newArrayList(Iterator<T> iterator,
T... elements)
Factory method for create new
ArrayList from the given optional iterator and the
given optional elements. |
static <T> List<T> |
newArrayList(T... elements)
Factory method for create new
ArrayList from the given optional elements. |
static <T> List<T> |
newLinkedList(Collection<T> collection,
T... elements)
Factory method for create new
LinkedList from the given optional collection and the
given optional elements. |
static <T> List<T> |
newLinkedList(T... elements)
Factory method for create new
LinkedList from the given optional elements. |
static List<Integer> |
newRangeList(int start,
int end)
|
@SafeVarargs public static <T> List<T> newArrayList(Iterator<T> iterator, T... elements)
ArrayList from the given optional iterator and the
given optional elements.@SafeVarargs public static <T> List<T> newArrayList(Iterable<T> iterable, T... elements)
ArrayList from the given optional iterable and the
given optional elements.@SafeVarargs public static <T> List<T> newArrayList(Collection<T> collection, T... elements)
ArrayList from the given optional collection and the
given optional elements.@SafeVarargs public static <T> List<T> newArrayList(T... elements)
ArrayList from the given optional elements.public static List<Integer> newRangeList(int start, int end)
Integer List with the given range that is defined through start
and end. For instance if the start is 5 and the end is 9 the resulted List will be
[5,6,7,8,9]start - The number to startend - The number to end minus oneInteger List@SafeVarargs public static <T> List<T> newLinkedList(Collection<T> collection, T... elements)
LinkedList from the given optional collection and the
given optional elements.T - the generic type of the elementscollection - the optional collection that will be added to the new listelements - the optional elements to be added in the new LinkedList.LinkedList as List.@SafeVarargs public static <T> List<T> newLinkedList(T... elements)
LinkedList from the given optional elements.T - the generic type of the elementselements - the elements to add in the new LinkedList.LinkedList as List.Copyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.