V - the generic type of the value to validate.PARENT - the generic type of the parent builder.SELF - the generic type of this builder itself (this).public abstract class ValidatorBuilderTime<V,PARENT,SELF extends ValidatorBuilderTime<V,PARENT,SELF>> extends ObjectValidatorBuilder<V,PARENT,SELF>
ObjectValidatorBuilder for date and time values.| Constructor and Description |
|---|
ValidatorBuilderTime(PARENT parent)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract SELF |
after(AttributeReadValue<V> valueSource)
Adds a validator that checks that the date/time is after the given value. |
abstract SELF |
after(V value)
Adds a validator that checks that the date/time is after the given value. |
abstract SELF |
before(AttributeReadValue<V> valueSource)
Adds a validator that checks that the date/time is before the given value. |
abstract SELF |
before(V value)
Adds a validator that checks that the date/time is before the given value. |
abstract SELF |
future()
Adds a validator that checks that the date/time is in the future. |
protected abstract V |
parse(String value) |
abstract SELF |
past()
Adds a validator that checks that the date/time is in the past. |
SELF |
range(String min,
String max)
This method allows to define a range in a generic way.
|
SELF |
range(V min,
V max) |
add, and, build, getValidators, mandatory, selfprotected abstract V parse(String value)
value - the value as String.public SELF range(String min, String max)
ObjectValidatorBuilderCompareableValidatorBuilder.range(net.sf.mmm.util.value.api.Range) instead.range in class ObjectValidatorBuilder<V,PARENT,SELF extends ValidatorBuilderTime<V,PARENT,SELF>>min - the minimum value allowed or null for no lower bound.max - the maximum value allowed or null for no upper bound.public SELF range(V min, V max)
min - the lower bound.max - the upper bound.public abstract SELF past()
Adds a validator that checks that the date/time is in the past.public abstract SELF future()
Adds a validator that checks that the date/time is in the future.public abstract SELF after(V value)
Adds a validator that checks that the date/time is after the given value.value - the date/time to compare.public abstract SELF after(AttributeReadValue<V> valueSource)
Adds a validator that checks that the date/time is after the given value.valueSource - the source of the date/time to compare.public abstract SELF before(V value)
Adds a validator that checks that the date/time is before the given value.value - the date/time to compare.public abstract SELF before(AttributeReadValue<V> valueSource)
Adds a validator that checks that the date/time is before the given value.valueSource - the source of the date/time to compare.Copyright © 2001–2016 mmm-Team. All rights reserved.