public class CollectionUtils extends Object
Collection
related utlities.Modifier and Type | Class and Description |
---|---|
static interface |
CollectionUtils.Mapper<T_Result,T_Source>
Contract for
Collection -s mapping. |
Modifier | Constructor and Description |
---|---|
protected |
CollectionUtils()
Only static members.
|
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
createListFrom(Iterable<T> iterable)
Creates list from iterable.
|
static <T_Result,T_Source> |
map(Collection<T_Source> source,
CollectionUtils.Mapper<T_Result,T_Source> mapper)
Re-maps a provided collection.
|
static String |
mapToString(Map<?,?> map) |
protected CollectionUtils()
public static <T_Result,T_Source> List<T_Result> map(Collection<T_Source> source, CollectionUtils.Mapper<T_Result,T_Source> mapper)
T_Result
- type of resultT_Source
- type of sourcesource
- for mappingmapper
- element mapperpublic static <T> List<T> createListFrom(Iterable<T> iterable)
T
- Collection elementiterable
- Iterable that will be used to create list.public static String mapToString(Map<?,?> map)