Interface TimeValidator
- All Known Implementing Classes:
AbstractTimeValidator,AbstractTimeValidator.DateConstraint,AbstractTimeValidator.LocalDateConstraint,AbstractTimeValidator.LocalDateTimeConstraint,AbstractTimeValidator.LocalTimeConstraint,AbstractTimeValidator.OffsetDateTimeConstraint,AbstractTimeValidator.OffsetTimeConstraint
public interface TimeValidator
Base interface for date/time validators which contains all restrictions.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisFuture()booleanbooleanisPast()booleanvoidsetCheckSeconds(boolean checkSeconds) Sets check seconds to validator.
-
Method Details
-
isPast
boolean isPast()- Returns:
- true if date or time in the past
-
isPastOrPresent
boolean isPastOrPresent()- Returns:
- true if date or time in the past or present
-
isFuture
boolean isFuture()- Returns:
- true if date or time in the future
-
isFutureOrPresent
boolean isFutureOrPresent()- Returns:
- true if date or time in the future or present
-
setCheckSeconds
void setCheckSeconds(boolean checkSeconds) Sets check seconds to validator. Set true if validator should check seconds and nanos while it comparing dates or times.- Parameters:
checkSeconds- check seconds and nanos option, false by default
-