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