public class WeldCollections extends Object
Modifier and Type | Field and Description |
---|---|
static Map<Object,List<Object>> |
EMPTY_ARRAY_SET_MULTIMAP |
Modifier and Type | Method and Description |
---|---|
static <E> boolean |
addAll(Collection<E> collection,
E... elements) |
static <T> List<T> |
immutableGuavaList(List<T> list)
Returns an immutable view of a given list.
|
static <T> Set<T> |
immutableGuavaSet(Set<T> set)
Returns an immutable view of a given set.
|
static <T> List<T> |
immutableList(List<T> list)
Returns an immutable view of a given list.
|
static <K,V> Map<K,V> |
immutableMap(Map<K,V> map)
Returns an immutable view of a given map.
|
static <T> Set<T> |
immutableSet(Set<T> set)
Returns an immutable view of a given set.
|
static <T> List<T> |
sort(List<T> list,
Comparator<? super T> comparator)
Fluent version of
Collections.sort(List, Comparator) |
static String |
toMultiRowString(Collection<?> collection)
Returns the supplied collection as a multi-row string with every toString() of every element of the collection
in its own row.
|
public static <T> Set<T> immutableSet(Set<T> set)
ArraySet
, it is trimmed.public static <T> Set<T> immutableGuavaSet(Set<T> set)
public static <T> List<T> immutableList(List<T> list)
ArrayList
, it is trimmed.public static <T> List<T> immutableGuavaList(List<T> list)
public static <K,V> Map<K,V> immutableMap(Map<K,V> map)
public static <T> List<T> sort(List<T> list, Comparator<? super T> comparator)
Collections.sort(List, Comparator)
public static String toMultiRowString(Collection<?> collection)
- aaa, - bbb, - ccc
public static <E> boolean addAll(Collection<E> collection, E... elements)
collection
- elements
- Copyright © 2016. All rights reserved.