Package org.derive4j.processor.api
Class DeriveResults
- java.lang.Object
-
- org.derive4j.processor.api.DeriveResults
-
public final class DeriveResults extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeriveResults.CaseOfMatchersstatic classDeriveResults.CasesMatchersprivate static classDeriveResults.Error<A>private static classDeriveResults.Lazy<A>private static classDeriveResults.Result<A>
-
Constructor Summary
Constructors Modifier Constructor Description privateDeriveResults()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A> DeriveResults.CaseOfMatchers.TotalMatcher_Error<A>caseOf(DeriveResult<A> deriveResult)static <A> DeriveResults.CasesMatchers.TotalMatcher_Error<A>cases()static <A> DeriveResult<A>error(DeriveMessage error)static <A> java.util.Optional<DeriveMessage>getError(DeriveResult<A> deriveResult)static <A> java.util.Optional<A>getResult(DeriveResult<A> deriveResult)static <A> DeriveResult<A>lazy(java.util.function.Supplier<DeriveResult<A>> deriveResult)static <A> java.util.function.Function<DeriveResult<A>,DeriveResult<A>>modError(java.util.function.Function<DeriveMessage,DeriveMessage> errorMod)static <A,RA>
java.util.function.Function<DeriveResult<A>,DeriveResult<RA>>modResult(java.util.function.Function<A,RA> resultMod)static <A> DeriveResult<A>result(A result)static <A> java.util.function.Function<DeriveResult<A>,DeriveResult<A>>setError(DeriveMessage newError)static <A,RA>
java.util.function.Function<DeriveResult<A>,DeriveResult<RA>>setResult(RA newResult)
-
-
-
Method Detail
-
error
public static <A> DeriveResult<A> error(DeriveMessage error)
-
result
public static <A> DeriveResult<A> result(A result)
-
lazy
public static <A> DeriveResult<A> lazy(java.util.function.Supplier<DeriveResult<A>> deriveResult)
-
cases
public static <A> DeriveResults.CasesMatchers.TotalMatcher_Error<A> cases()
-
caseOf
public static <A> DeriveResults.CaseOfMatchers.TotalMatcher_Error<A> caseOf(DeriveResult<A> deriveResult)
-
getError
public static <A> java.util.Optional<DeriveMessage> getError(DeriveResult<A> deriveResult)
-
getResult
public static <A> java.util.Optional<A> getResult(DeriveResult<A> deriveResult)
-
setError
public static <A> java.util.function.Function<DeriveResult<A>,DeriveResult<A>> setError(DeriveMessage newError)
-
modError
public static <A> java.util.function.Function<DeriveResult<A>,DeriveResult<A>> modError(java.util.function.Function<DeriveMessage,DeriveMessage> errorMod)
-
setResult
public static <A,RA> java.util.function.Function<DeriveResult<A>,DeriveResult<RA>> setResult(RA newResult)
-
modResult
public static <A,RA> java.util.function.Function<DeriveResult<A>,DeriveResult<RA>> modResult(java.util.function.Function<A,RA> resultMod)
-
-