Class ValidationRule<T>
- java.lang.Object
-
- be.sddevelopment.commons.validation.ValidationRule<T>
-
- All Implemented Interfaces:
Rule<T>
public final class ValidationRule<T> extends Object implements Rule<T>
Description of file/class
- Version:
- 1.0.0
- Author:
- Stijn Dejongh
-
-
Constructor Summary
Constructors Constructor Description ValidationRule(Function<T,Boolean> assertion, Function<T,Function<Failure.FailureBuilder,Failure.FailureBuilder>> failureCreator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Function<T,Boolean>
getAssertion()
Function<T,Function<Failure.FailureBuilder,Failure.FailureBuilder>>
getFailureCreator()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
ValidationRule
public ValidationRule(Function<T,Boolean> assertion, Function<T,Function<Failure.FailureBuilder,Failure.FailureBuilder>> failureCreator)
-
-
Method Detail
-
getAssertion
public Function<T,Boolean> getAssertion()
- Specified by:
getAssertion
in interfaceRule<T>
-
getFailureCreator
public Function<T,Function<Failure.FailureBuilder,Failure.FailureBuilder>> getFailureCreator()
- Specified by:
getFailureCreator
in interfaceRule<T>
-
-