Package | Description |
---|---|
io.simplesource.api | |
io.simplesource.data |
Modifier and Type | Method and Description |
---|---|
Result<CommandError,NonEmptyList<E>> |
CommandHandler.interpretCommand(K key,
A currentAggregate,
C command)
Determine whether you will accept the given command given the current aggregate and, if so, transform it into events.
|
Modifier and Type | Method and Description |
---|---|
<F> Result<F,A> |
Result.errorMap(java.util.function.Function<E,F> errorMapper)
Modifies the error type of the result, returning a new
Result |
static <E,S> Result<E,S> |
Result.failure(E error,
E... errors)
Factory method to creates a Failed
Result from a array value of error |
static <E,S> Result<E,S> |
Result.failure(NonEmptyList<E> errors)
Factory method to creates a Failed
Result from a {@link NonEmptyList< E >} } |
<T> Result<E,T> |
Result.flatMap(java.util.function.Function<A,Result<E,T>> mapper)
Runs the given function on the contents value this Result, returning a new
Result with the
extracted reason extracted from the functions returned Result<E, T> |
Result<E,T> |
FutureResult.getOrElse(java.util.function.Supplier<Result<E,T>> resultSupplier,
java.util.function.Function<Exception,E> f) |
<T> Result<E,T> |
Result.map(java.util.function.Function<A,T> mapper)
Runs the given function on the contents value this Result, returning a new
Result with the
output value the result of that function. |
static <E,S> Result<E,S> |
Result.success(S s)
Factory method to creates a succesful
Result from a value. |
Result<E,T> |
FutureResult.unsafePerform(java.util.function.Function<Exception,E> f) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Result<E,T>> |
FutureResult.future() |
Modifier and Type | Method and Description |
---|---|
static <E,T> FutureResult<E,T> |
FutureResult.ofResult(Result<E,T> result) |
Modifier and Type | Method and Description |
---|---|
<T> Result<E,T> |
Result.flatMap(java.util.function.Function<A,Result<E,T>> mapper)
Runs the given function on the contents value this Result, returning a new
Result with the
extracted reason extracted from the functions returned Result<E, T> |
Result<E,T> |
FutureResult.getOrElse(java.util.function.Supplier<Result<E,T>> resultSupplier,
java.util.function.Function<Exception,E> f) |
static <E,T> FutureResult<E,T> |
FutureResult.ofCompletableFuture(CompletableFuture<Result<E,T>> run) |
static <E,T> FutureResult<E,T> |
FutureResult.ofFutureResult(Future<Result<E,T>> future,
java.util.function.Function<Exception,E> f) |
static <E,T> FutureResult<E,T> |
FutureResult.ofSupplier(java.util.function.Supplier<Result<E,T>> supplier) |
Copyright © 2019. All rights reserved.