Class AbstractTimeValidator<T>
java.lang.Object
io.jmix.flowui.component.validation.time.AbstractTimeValidator<T>
- All Implemented Interfaces:
TimeValidator
- Direct Known Subclasses:
AbstractTimeValidator.DateConstraint
,AbstractTimeValidator.LocalDateConstraint
,AbstractTimeValidator.LocalDateTimeConstraint
,AbstractTimeValidator.LocalTimeConstraint
,AbstractTimeValidator.OffsetDateTimeConstraint
,AbstractTimeValidator.OffsetTimeConstraint
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected static Map<Class<?>,
TimeValidator> protected TimeSource
protected T
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
boolean
isFuture()
boolean
boolean
isPast()
boolean
void
setCheckSeconds
(boolean checkSeconds) Sets check seconds to validator.
-
Field Details
-
timeSource
-
value
-
checkSeconds
protected boolean checkSeconds -
constraints
-
-
Constructor Details
-
AbstractTimeValidator
-
-
Method Details
-
isPast
public boolean isPast()- Specified by:
isPast
in interfaceTimeValidator
- Returns:
- true if date or time in the past
-
isPastOrPresent
public boolean isPastOrPresent()- Specified by:
isPastOrPresent
in interfaceTimeValidator
- Returns:
- true if date or time in the past or present
-
isFuture
public boolean isFuture()- Specified by:
isFuture
in interfaceTimeValidator
- Returns:
- true if date or time in the future
-
isFutureOrPresent
public boolean isFutureOrPresent()- Specified by:
isFutureOrPresent
in interfaceTimeValidator
- Returns:
- true if date or time in the future or present
-
setCheckSeconds
public void setCheckSeconds(boolean checkSeconds) Description copied from interface:TimeValidator
Sets check seconds to validator. Set true if validator should check seconds and nanos while it comparing dates or times.- Specified by:
setCheckSeconds
in interfaceTimeValidator
- Parameters:
checkSeconds
- check seconds and nanos option, false by default
-
compareValueWithCurrent
public abstract int compareValueWithCurrent()
-