public class CollectionUtil extends Object
Collections.
| Modifier and Type | Class and Description |
|---|---|
static interface |
CollectionUtil
|
| Constructor and Description |
|---|
CollectionUtil()
|
| Modifier and Type | Method and Description |
|---|---|
static void |
apply(Collection
Executes a function on each item in a Collection but does not accumulate the result
|
static List |
select(Collection
Executes a
CollectionUtil.Function on each item in a Collection and collects all the entries for which the result of the function is equal to
Boolean
true.
|
static List |
transform(Collection
Executes a function on each item in a
Collection and returns the results in a new
List
|
public static Listtransform(Collection coll, CollectionUtil .Function func)
Collection and returns the results in a new
List
coll - the collection to process
func - the Function to execute
public static void apply(Collectioncoll, CollectionUtil .Function func)
coll - the collection to process
func - the Function to execute
public static Listselect(Collection collection, CollectionUtil .Function func)
CollectionUtil.Function on each item in a Collection and collects all the entries for which the result of the function is equal to
Boolean
true.
collection - the collection to process
func - the Function to execute