Package one.xingyi.fp
Interface IPartialFunctionE<From,To>
- All Superinterfaces:
FunctionWithException<From,To>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <From,To> IPartialFunctionE<From, To> always(FunctionWithException<From, To> fn) static <From,To> To applyOr(IPartialFunctionE<From, To> pfn, Supplier<To> defValue, From from) static <From,To> To applyOrError(IPartialFunctionE<From, To> pfn, From from) static <From,To> FunctionWithException<From, To> chain(To defValue, Collection<IPartialFunctionE<From, To>> fns) static <From,To> IPartialFunctionE<From, To> chainToPfE(Collection<IPartialFunctionE<From, To>> fns) booleanisDefinedAt(From from) static <From,To> FunctionWithException<From, List<To>> mapFn(Collection<IPartialFunctionE<From, To>> fns) static <From,To, Result>
FunctionWithException<From,Result> mapReduceFn(Collection<IPartialFunctionE<From, To>> fns, FunctionWithException<List<To>, Result> reduceFn) static <From,To> IPartialFunctionE<From, To> notNull(FunctionWithException<From, To> fn) static <From,To> IPartialFunctionE<From, To> of(PredicateWithException<From> isDefinedAt, FunctionWithException<From, To> fn) default IPartialFunctionE<From,To> orElse(IPartialFunctionE<From, To> other) Methods inherited from interface one.xingyi.interfaces.FunctionWithException
apply
-
Method Details
-
isDefinedAt
- Throws:
Exception
-
orElse
-
always
-
applyOrError
- Throws:
Exception
-
applyOr
static <From,To> To applyOr(IPartialFunctionE<From, To> pfn, Supplier<To> defValue, From from) throws Exception- Throws:
Exception
-
of
static <From,To> IPartialFunctionE<From,To> of(PredicateWithException<From> isDefinedAt, FunctionWithException<From, To> fn) -
notNull
-
mapFn
static <From,To> FunctionWithException<From,List<To>> mapFn(Collection<IPartialFunctionE<From, To>> fns) -
mapReduceFn
static <From,To, FunctionWithException<From,Result> Result> mapReduceFn(Collection<IPartialFunctionE<From, To>> fns, FunctionWithException<List<To>, Result> reduceFn) -
chain
static <From,To> FunctionWithException<From,To> chain(To defValue, Collection<IPartialFunctionE<From, To>> fns) -
chainToPfE
-