Package com.io7m.jproperties.monad
Interface JPropertyParseMonadType<A>
- Type Parameters:
A- The type of returned values
- All Known Subinterfaces:
JPropertyParseMonadType.JPropertyFailureType<A>,JPropertyParseMonadType.JPropertySuccessType<A>
- All Known Implementing Classes:
JPropertyFailure,JPropertySuccess
public interface JPropertyParseMonadType<A>
A parser monad.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceJPropertyParseMonadType.JPropertyErrorTypeThe type of parse errors.static interfaceJPropertyParseMonadType.JPropertyFailureType<A>A result indicating failure.static interfaceJPropertyParseMonadType.JPropertySuccessType<A>A result indicating success.static interfaceJPropertyParseMonadType.JPropertyWarningTypeThe type of parse warnings.static classJPropertyParseMonadType.KindThe kind of result.static classJPropertyParseMonadType.UnitSingle-valued unit type. -
Method Summary
Modifier and Type Method Description default <B> JPropertyParseMonadType<B>andThen(java.util.function.Supplier<JPropertyParseMonadType<B>> f)Monadic bind for parse values.java.util.List<JPropertyError>errors()<B> JPropertyParseMonadType<B>flatMap(java.util.function.Function<A,JPropertyParseMonadType<B>> f)Monadic bind for parse values.JPropertyParseMonadType.Kindkind()<B> JPropertyParseMonadType<B>map(java.util.function.Function<A,B> f)Functor map for parse values.java.util.List<JPropertyWarning>warnings()
-
Method Details
-
kind
JPropertyParseMonadType.Kind kind()- Returns:
- The kind of result
-
warnings
java.util.List<JPropertyWarning> warnings()- Returns:
- The accumulated warnings
-
errors
java.util.List<JPropertyError> errors()- Returns:
- The accumulated errors
-
flatMap
<B> JPropertyParseMonadType<B> flatMap(java.util.function.Function<A,JPropertyParseMonadType<B>> f)Monadic bind for parse values.- Type Parameters:
B- The type of result values- Parameters:
f- A function to apply to the current value- Returns:
- A monad
-
andThen
default <B> JPropertyParseMonadType<B> andThen(java.util.function.Supplier<JPropertyParseMonadType<B>> f)Monadic bind for parse values.- Type Parameters:
B- The type of result values- Parameters:
f- A function to apply to the current value- Returns:
- A monad
-
map
Functor map for parse values.- Type Parameters:
B- The type of result values- Parameters:
f- A function to apply to the current value- Returns:
- A monad
-