public class FunctionalListParallel extends Object
FunctionalList
but executes any operations in parallel where possible.Modifier and Type | Method and Description |
---|---|
static <S,T,E extends Exception> |
mapToListOptional(Collection<S> collection,
Class<? extends Exception> throwableClass,
CheckedFunction<S,Optional<T>,E> mapFunction)
Maps a collection to a list with each element in the original collection maybe producing an
element in the output.
|
public static <S,T,E extends Exception> List<T> mapToListOptional(Collection<S> collection, Class<? extends Exception> throwableClass, CheckedFunction<S,Optional<T>,E> mapFunction) throws E extends Exception
S
- parameter-type for functionT
- return-type for functionE
- an exception that may be thrown by an mapFunction
collection
- the collection to be mapped.throwableClass
- class type of exception that may be thrown by mapFunction
.mapFunction
- function to do the mapping to an Optional (the item is included in the
output if the optional is defined).E
- if it is thrown by any call to mapFunction
E extends Exception
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.