Class IdOptional
java.lang.Object
com.io7m.idstore.model.IdOptional
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceIdOptional.IdPartialFunctionType<A, B, E extends Exception>The type of partial functions. -
Method Summary
Modifier and TypeMethodDescriptionflatMapPartial(Optional<A> o, IdOptional.IdPartialFunctionType<A, Optional<B>, E> f) mapPartial(Optional<A> o, IdOptional.IdPartialFunctionType<A, B, E> f)
-
Method Details
-
mapPartial
public static <A, B, E extends Exception> Optional<B> mapPartial(Optional<A> o, IdOptional.IdPartialFunctionType<A, B, throws EE> f) - Type Parameters:
A- The type of source valuesB- The type of return valuesE- The type of exceptions raised- Parameters:
o- The optionalf- The function- Returns:
- The value of
f - Throws:
E- On errors
-
flatMapPartial
public static <A, B, E extends Exception> Optional<B> flatMapPartial(Optional<A> o, IdOptional.IdPartialFunctionType<A, Optional<B>, E> f) throws E - Type Parameters:
A- The type of source valuesB- The type of return valuesE- The type of exceptions raised- Parameters:
o- The optionalf- The function- Returns:
- The value of
f - Throws:
E- On errors
-