public final class ListFactory
extends java.lang.Object
ListFactory provides factory methods for create new Map objects| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.List<T> |
newArrayList(java.util.Collection<T> collection,
T... elements)
Factory method for create new
ArrayList from the given optional collection and the
given optional elements. |
static <T> java.util.List<T> |
newArrayList(java.lang.Iterable<T> iterable,
T... elements)
Factory method for create new
ArrayList from the given optional iterable and the
given optional elements. |
static <T> java.util.List<T> |
newArrayList(java.util.Iterator<T> iterator,
T... elements)
Factory method for create new
ArrayList from the given optional iterator and the
given optional elements. |
static <T> java.util.List<T> |
newArrayList(T... elements)
Factory method for create new
ArrayList from the given optional elements. |
static <T> java.util.List<T> |
newLinkedList(java.util.Collection<T> collection,
T... elements)
Factory method for create new
LinkedList from the given optional collection and the
given optional elements. |
static <T> java.util.List<T> |
newLinkedList(T... elements)
Factory method for create new
LinkedList from the given optional elements. |
static java.util.List<java.lang.Integer> |
newRangeList(int start,
int end)
Creates a new
Integer List with the given range that is defined through start
and end. |
@SafeVarargs
public static <T> java.util.List<T> newArrayList(java.util.Collection<T> collection,
T... elements)
ArrayList 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 ArrayList.ArrayList as List.@SafeVarargs
public static <T> java.util.List<T> newArrayList(java.lang.Iterable<T> iterable,
T... elements)
ArrayList from the given optional iterable and the
given optional elements.T - the generic type of the elementsiterable - the optional iterable that will be added to the new listelements - the optional elements to be added in the new ArrayList.ArrayList as List.@SafeVarargs
public static <T> java.util.List<T> newArrayList(java.util.Iterator<T> iterator,
T... elements)
ArrayList from the given optional iterator and the
given optional elements.T - the generic type of the elementsiterator - the optional iterator that will be added to the new listelements - the optional elements to be added in the new ArrayList.ArrayList as List.@SafeVarargs public static <T> java.util.List<T> newArrayList(T... elements)
ArrayList from the given optional elements.T - the generic type of the elementselements - the elements to add in the new ArrayList.ArrayList as List.@SafeVarargs
public static <T> java.util.List<T> newLinkedList(java.util.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> java.util.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.public static java.util.List<java.lang.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