Class ListFunctions
- java.lang.Object
-
- org.intermine.webservice.server.core.ListFunctions
-
public final class ListFunctions extends java.lang.Object
Similar to Apache CollectionUtils - but with Generics.- Author:
- Alex Kalderimis
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,R>
java.util.List<R>map(java.lang.Iterable<T> things, Function<T,R> f)
Transform a collection of things into a list of other things.
-
-
-
Method Detail
-
map
public static <T,R> java.util.List<R> map(java.lang.Iterable<T> things, Function<T,R> f)
Transform a collection of things into a list of other things.- Type Parameters:
T
- The type of the input things.R
- The type of the output things.- Parameters:
things
- The things we are transforming.f
- The function that does the transformation.- Returns:
- A list of new things
-
-