|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.common.util.BLCCollectionUtils
public class BLCCollectionUtils
Convenience methods for interacting with collections.
| Constructor Summary | |
|---|---|
BLCCollectionUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
collect(Collection inputCollection,
TypedTransformer<T> transformer)
Delegates to CollectionUtils.collect(Collection, Transformer), but performs the necessary type coercion
to allow the returned collection to be correctly casted based on the TypedTransformer. |
|
static
|
collectArray(Collection inputCollection,
TypedTransformer<T> transformer,
Class<T> clazz)
The same as collect(Collection, TypedTransformer) but returns an array |
|
static
|
collectList(Collection inputCollection,
TypedTransformer<T> transformer)
The same as collect(Collection, TypedTransformer) but returns an ArrayList |
|
static
|
selectList(Collection<T> inputCollection,
TypedPredicate<T> predicate)
Delegates to CollectionUtils.select(Collection, org.apache.commons.collections.Predicate), but will
force the return type to be a List |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BLCCollectionUtils()
| Method Detail |
|---|
public static <T> Collection<T> collect(Collection inputCollection,
TypedTransformer<T> transformer)
CollectionUtils.collect(Collection, Transformer), but performs the necessary type coercion
to allow the returned collection to be correctly casted based on the TypedTransformer.
inputCollection - transformer -
public static <T> List<T> collectList(Collection inputCollection,
TypedTransformer<T> transformer)
collect(Collection, TypedTransformer) but returns an ArrayList
inputCollection - transformer -
public static <T> T[] collectArray(Collection inputCollection,
TypedTransformer<T> transformer,
Class<T> clazz)
collect(Collection, TypedTransformer) but returns an array
inputCollection - transformer -
public static <T> List<T> selectList(Collection<T> inputCollection,
TypedPredicate<T> predicate)
CollectionUtils.select(Collection, org.apache.commons.collections.Predicate), but will
force the return type to be a List
inputCollection - predicate -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||