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