public final class Collections
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
isEmpty(java.util.Collection<T> values)
Check if collection is empty (
null or empty). |
static <T> java.lang.String |
join(java.util.Collection<T> values,
java.lang.String separator)
Join elements of collection to a final string.
|
static <T,U> java.util.List<U> |
map(java.util.List<T> inputs,
Mapper<T,U> mapper)
Map list of inputs to a new list of outputs.
|
static <T> int |
size(java.util.Collection<T> values)
Get size of collection.
|
public static <T> boolean isEmpty(java.util.Collection<T> values)
null
or empty).T
- Type of element in collection.values
- Collection of values.public static <T> int size(java.util.Collection<T> values)
T
- Type of element in collection.values
- Collection of values.public static <T> java.lang.String join(java.util.Collection<T> values, java.lang.String separator)
T
- Type of element in collection.values
- Collection of values.separator
- Separator, use to separate each elements.public static <T,U> java.util.List<U> map(java.util.List<T> inputs, Mapper<T,U> mapper)
T
- Type of input.U
- Type of output.inputs
- Input list.mapper
- Mapper used to transform inputs.Copyright © 2018. All Rights Reserved.