public final class CollectionUtils extends Object
Collection
s.Modifier and Type | Method and Description |
---|---|
static <E> ArrayList<E> |
newArrayList(E... elements)
Creates a new
ArrayList with the provided elements. |
static <E> HashSet<E> |
newHashSet(E... elements)
Creates a new
HashSet with the provided elements. |
static <E> LinkedHashSet<E> |
newLinkedHashSet(E... elements)
Creates a new
LinkedHashSet with the provided elements. |
static <E> LinkedList<E> |
newLinkedList(E... elements)
Creates a new
LinkedList with the provided elements. |
static <E> TreeSet<E> |
newTreeSet(E... elements)
Creates a new
TreeSet with the provided elements. |
public static <E> ArrayList<E> newArrayList(E... elements)
ArrayList
with the provided elements.E
- the elements' typeelements
- the elements to add to the new ArrayListpublic static <E> LinkedList<E> newLinkedList(E... elements)
LinkedList
with the provided elements.E
- the elements' typeelements
- the elements to add to the new LinkedListpublic static <E> HashSet<E> newHashSet(E... elements)
HashSet
with the provided elements.E
- the elements' typeelements
- the elements to add to the new HashSetpublic static <E> LinkedHashSet<E> newLinkedHashSet(E... elements)
LinkedHashSet
with the provided elements.E
- the elements' typeelements
- the elements to add to the new LinkedHashSetpublic static <E> TreeSet<E> newTreeSet(E... elements)
TreeSet
with the provided elements.E
- the elements' typeelements
- the elements to add to the new TreeSetCopyright © 2010-2016 ForgeRock AS. All Rights Reserved.