Package one.xingyi.fp
Interface ListComprehensionsForExceptions
public interface ListComprehensionsForExceptions
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T,T1> List<T1> collectByClassE(Iterable<T> iterable, Class<T1> theClass, FunctionWithException<T, T1> fn) static <T,T1> List<T1> collectE(Iterable<T> iterable, FunctionWithException<T, Boolean> filter, FunctionWithException<T, T1> fn) static <T> List<T>filterE(Iterable<T> iterable, FunctionWithException<T, Boolean> filter) static <T,T1> List<T1> flatMapE(Iterable<T> iterable, FunctionWithException<T, ? extends Collection<T1>> fn) static <Acc,T> Acc foldE(Iterable<T> iterable, BiFunctionWithException<Acc, T, Acc> foldFn, Acc zero) static <T> voidforeachE(Iterable<T> iterable, ConsumerWithException<T> fn) static <T,T1> List<T1> mapE(Iterable<T> iterable, FunctionWithException<T, T1> fn) static <T> TreduceE(Iterable<T> iterable, BiFunctionWithException<T, T, T> foldFn) static <Id,T> Map<Id, T> toIdMapE(Iterable<T> iterable, FunctionWithException<T, Id> fn) static <T,K, V> Map<K, V> toMapE(Iterable<T> iterable, FunctionWithException<T, K> keyFn, FunctionWithException<T, V> vFn)
-
Method Details
-
mapE
- Throws:
Exception
-
filterE
static <T> List<T> filterE(Iterable<T> iterable, FunctionWithException<T, Boolean> filter) throws Exception- Throws:
Exception
-
collectE
static <T,T1> List<T1> collectE(Iterable<T> iterable, FunctionWithException<T, Boolean> filter, FunctionWithException<T, throws ExceptionT1> fn) - Throws:
Exception
-
collectByClassE
static <T,T1> List<T1> collectByClassE(Iterable<T> iterable, Class<T1> theClass, FunctionWithException<T, T1> fn) throws Exception- Throws:
Exception
-
foreachE
- Throws:
Exception
-
flatMapE
static <T,T1> List<T1> flatMapE(Iterable<T> iterable, FunctionWithException<T, ? extends Collection<T1>> fn) throws Exception- Throws:
Exception
-
toIdMapE
static <Id,T> Map<Id,T> toIdMapE(Iterable<T> iterable, FunctionWithException<T, Id> fn) throws Exception- Throws:
Exception
-
toMapE
static <T,K, Map<K,V> V> toMapE(Iterable<T> iterable, FunctionWithException<T, K> keyFn, FunctionWithException<T, throws ExceptionV> vFn) - Throws:
Exception
-
foldE
static <Acc,T> Acc foldE(Iterable<T> iterable, BiFunctionWithException<Acc, T, throws ExceptionAcc> foldFn, Acc zero) - Throws:
Exception
-
reduceE
- Throws:
Exception
-