V
- is the generic type of the value to validate
.public abstract class ValidatorTimePast<V> extends AbstractValueValidator<V>
ValueValidator
that
validates
that a date lies in the
past.Modifier and Type | Field and Description |
---|---|
static String |
CODE |
PROPERTY_MANDATORY, PROPERTY_MAXIMUM, PROPERTY_MINIMUM
Constructor and Description |
---|
ValidatorTimePast()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected String |
getCode()
This is the default implementation to retrieve the
code of this
ValueValidator . |
int |
hashCode() |
protected abstract boolean |
isPast(V value) |
protected NlsMessage |
validateNotNull(V value)
This method performs the validation in case
value is NOT null . |
validate, validateNull
append, contains, createBundle, getProperty, isDynamic, isMandatory, validate
public static final String CODE
getCode()
,
Constant Field Valuesprotected String getCode()
AbstractValidator
code
of this
ValueValidator
. classname
of the actual
ValueValidator
implementation. This strategy is chosen for simplicity when implementing a new validator. To
ensure stable codes override this method and return a string constant. This shall at least be done when the name of
the class is changed.getCode
in class AbstractValidator<V>
code
.protected NlsMessage validateNotNull(V value)
AbstractValueValidator
value
is NOT null
. This method contains the actual
custom logic for the validation. It is therefore designed in a way that makes it most simple to implement custom
validators. NlsMessage
instead.validateNotNull
in class AbstractValueValidator<V>
value
- is the value to validate.failure message
or null
if the the given value
is valid.protected abstract boolean isPast(V value)
value
- the date to check.true
if in future, false
otherwise.public int hashCode()
hashCode
in class AbstractValidator<V>
public boolean equals(Object obj)
equals
in class AbstractValidator<V>
Copyright © 2001–2016 mmm-Team. All rights reserved.