Package lumis.util.collections
Class Lists
- java.lang.Object
-
- lumis.util.collections.Lists
-
public abstract class Lists extends Object
List utility methods.- Since:
- 8.1.0
- Version:
- $Revision: 18249 $ $Date: 2016-01-21 11:20:08 -0200 (Thu, 21 Jan 2016) $
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> List<V>
filter(List<V> original, IItemFilter<V> filter)
Returns a list filtered by the currentIItemFilter
static <V> List<V>
fromCollection(Collection<V> collection)
Returns a list using the items in the given collection.static <From,To>
List<To>transform(List<From> list, Transformer<From,To> transformer)
Returns a newList
using the given transformer to transform the original elements into the new ones.
-
-
-
Method Detail
-
transform
public static <From,To> List<To> transform(List<From> list, Transformer<From,To> transformer) throws PortalException
Returns a newList
using the given transformer to transform the original elements into the new ones.- Parameters:
list
- the original list.transformer
- the transformer to be used.- Returns:
- a new
List
using the given transformer to transform the original elements into the new ones. - Throws:
PortalException
- Since:
- 8.1.0
-
fromCollection
public static <V> List<V> fromCollection(Collection<V> collection)
Returns a list using the items in the given collection. The order used to create the list is arbitrary and non-deterministic.- Parameters:
collection
- the collection of items.- Returns:
- a list using the items in the given collection.
- Since:
- 8.1.0
-
filter
public static <V> List<V> filter(List<V> original, IItemFilter<V> filter) throws PortalException
Returns a list filtered by the currentIItemFilter
- Parameters:
original
- original listfilter
- filter to be applied on original list- Returns:
- new filtered list
- Throws:
PortalException
- Since:
- 8.1.0
-
-