V - is the generic type of the value to validate.public abstract class ValidatorTimeBefore<V> extends AbstractValueValidator<V>
ValueValidator that
 validates that a date/time lies before
 a given value.| Modifier and Type | Field and Description | 
|---|---|
private V | 
bound  | 
private AttributeReadValue<V> | 
boundSource  | 
static String | 
CODE  | 
PROPERTY_MANDATORY, PROPERTY_MAXIMUM, PROPERTY_MINIMUM| Constructor and Description | 
|---|
ValidatorTimeBefore(AttributeReadValue<V> valueSource)
The constructor. 
 | 
ValidatorTimeBefore(V value)
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 | 
isBefore(V value,
        V limit)  | 
boolean | 
isDynamic()
This method determines if this  
ValueValidator is dynamic. | 
protected NlsMessage | 
validateNotNull(V value)
This method performs the validation in case  
value is NOT null. | 
validate, validateNullappend, contains, createBundle, getProperty, isMandatory, validatepublic static final String CODE
getCode(), 
Constant Field Valuesprivate final AttributeReadValue<V> boundSource
private final V bound
public ValidatorTimeBefore(AttributeReadValue<V> valueSource)
valueSource - the source of the value to compare to.public ValidatorTimeBefore(V value)
value - the value to compare to.public boolean isDynamic()
AbstractValidatorValueValidator is dynamic. Here dynamic means that the validation
 of the same input may not always return the same validation result (e.g. it holds references to instances that have
 dynamic impact on the validation).isDynamic in class AbstractValidator<V>true if this ValueValidator is dynamic, false otherwise.protected String getCode()
AbstractValidatorcode 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)
AbstractValueValidatorvalue 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 isBefore(V value, V limit)
value - the date to check.limit - the upper bound to compare to.true if value is before limit, 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.