public class PreConditionInteger extends PreCondition<java.lang.Integer,ValidationEngineInteger>
validationEngine| Modifier and Type | Method and Description |
|---|---|
ValidationEngineInteger |
canBeNull()
Set the null value to be considered as valid.
|
ValidationEngineInteger |
mustNotBeNull(java.lang.String message)
Set the null value to be considered as a validation error.
|
ValidationEngineInteger |
mustNotBeNullWhen(boolean value,
java.lang.String message)
Set the null value to be considered as a validation error if the provided boolean is true.
|
PreConditionInteger |
validateWhen(boolean validate)
Ignores the whole validation rule if the given value is false.
|
must, whenpublic ValidationEngineInteger mustNotBeNull(java.lang.String message)
PreConditionmustNotBeNull in class PreCondition<java.lang.Integer,ValidationEngineInteger>message - error message.public ValidationEngineInteger mustNotBeNullWhen(boolean value, java.lang.String message)
PreConditionmustNotBeNullWhen in class PreCondition<java.lang.Integer,ValidationEngineInteger>value - boolean to determine if null value should be invalidmessage - error messagepublic ValidationEngineInteger canBeNull()
PreConditioncanBeNull in class PreCondition<java.lang.Integer,ValidationEngineInteger>public PreConditionInteger validateWhen(boolean validate)
PreConditionvalidateWhen in class PreCondition<java.lang.Integer,ValidationEngineInteger>validate - false will ignore the validation