E
- Type representing validation or execution error.@ParametersAreNonnullByDefault public class PreValidatedActionExecutor<E> extends Object
Constructor and Description |
---|
PreValidatedActionExecutor() |
Modifier and Type | Method and Description |
---|---|
<T> io.atlassian.fugue.Either<E,T> |
executeFailOnFirstError(java.util.function.Supplier<io.atlassian.fugue.Either<E,T>> supplier)
Runs all validators and executes given supplier if all passed.
|
PreValidatedActionExecutor<E> |
withValidator(java.util.function.Supplier<io.atlassian.fugue.Option<E>> validator) |
public PreValidatedActionExecutor<E> withValidator(java.util.function.Supplier<io.atlassian.fugue.Option<E>> validator)
public <T> io.atlassian.fugue.Either<E,T> executeFailOnFirstError(java.util.function.Supplier<io.atlassian.fugue.Either<E,T>> supplier)
T
- Result typesupplier
- Action to perform when validation passesCopyright © 2002-2022 Atlassian. All Rights Reserved.