Interface ContinuingValidationBuilder<T>
-
- All Superinterfaces:
LoggingValidator,ReturningValidationBuilder<T>,ThrowingValidator<T>,Validator
public interface ContinuingValidationBuilder<T> extends ReturningValidationBuilder<T>, Validator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContinuingValidationBuilder<T>and(Rule.Extended<T> rule)Connect your current predicate to another one.ContinuingValidationBuilder<T>and(Rule<T> rule)Connect your current predicate to another one.VoidValidationBuilderandThen(Runnable runnable)Same as validate(); but returns a custom object in the form of a supplier.<R> ReturningValidationBuilder<R>andThen(Supplier<R> supplier)Same as validate(); but returns a custom object in the form of a supplier.-
Methods inherited from interface org.solidcoding.validation.api.contracts.LoggingValidator
orElseLogMessage, orElseLogMessage
-
Methods inherited from interface org.solidcoding.validation.api.contracts.ReturningValidationBuilder
orElseReturn, orElseReturn
-
Methods inherited from interface org.solidcoding.validation.api.contracts.ThrowingValidator
orElseThrow
-
Methods inherited from interface org.solidcoding.validation.api.contracts.Validator
getMessage, validate
-
-
-
-
Method Detail
-
and
ContinuingValidationBuilder<T> and(Rule<T> rule)
Connect your current predicate to another one.- Parameters:
rule- the next rule you wish to connect to the pipe.- Returns:
- ContinuingValidationBuilder to continue adding rules.
-
and
ContinuingValidationBuilder<T> and(Rule.Extended<T> rule)
Connect your current predicate to another one.- Parameters:
rule- the next rule you wish to connect to the pipe.- Returns:
- ContinuingValidationBuilder to continue adding rules.
-
andThen
<R> ReturningValidationBuilder<R> andThen(Supplier<R> supplier)
Same as validate(); but returns a custom object in the form of a supplier.- Type Parameters:
R- the type you wish to return.- Parameters:
supplier- the supplier which encapsulated the return type.- Returns:
- R in the form of a supplier.
-
andThen
VoidValidationBuilder andThen(Runnable runnable)
Same as validate(); but returns a custom object in the form of a supplier.- Parameters:
runnable- the runnable process which should be started after successful validation.- Returns:
- R in the form of a supplier.
-
-