Package org.derive4j.processor.api
Class DeriveResult<A>
- java.lang.Object
-
- org.derive4j.processor.api.DeriveResult<A>
-
- Direct Known Subclasses:
DeriveResults.Error
,DeriveResults.Lazy
,DeriveResults.Result
@Data public abstract class DeriveResult<A> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DeriveResult()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <B> DeriveResult<B>
bind(java.util.function.Function<A,DeriveResult<B>> f)
static <A> DeriveResult<A>
error(DeriveMessage errorMsg)
<B> DeriveResult<B>
map(java.util.function.Function<A,B> f)
abstract <R> R
match(java.util.function.Function<DeriveMessage,R> error, java.util.function.Function<A,R> result)
static <A> DeriveResult<A>
result(A result)
-
-
-
Method Detail
-
error
public static <A> DeriveResult<A> error(DeriveMessage errorMsg)
-
result
public static <A> DeriveResult<A> result(A result)
-
map
public <B> DeriveResult<B> map(java.util.function.Function<A,B> f)
-
bind
public <B> DeriveResult<B> bind(java.util.function.Function<A,DeriveResult<B>> f)
-
match
public abstract <R> R match(java.util.function.Function<DeriveMessage,R> error, java.util.function.Function<A,R> result)
-
-