public class CollectionUtil extends Object
Collections.| Modifier and Type | Class and Description |
|---|---|
static interface |
CollectionUtil.Function |
| Constructor and Description |
|---|
CollectionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
apply(Collection coll,
CollectionUtil.Function func)
Executes a function on each item in a Collection but does
not accumulate the result
|
static List |
select(Collection collection,
CollectionUtil.Function func)
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 coll,
CollectionUtil.Function func)
Executes a function on each item in a
Collection
and returns the results in a new List |
public static List transform(Collection coll, CollectionUtil.Function func)
Collection
and returns the results in a new Listcoll - the collection to processfunc - the Function to executepublic static void apply(Collection coll, CollectionUtil.Function func)
coll - the collection to processfunc - the Function to executepublic static List select(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 processfunc - the Function to executeCopyright © 2024. All rights reserved.