Class AbstractTimeValidator<T>

java.lang.Object
io.jmix.ui.component.validation.time.AbstractTimeValidator<T>
All Implemented Interfaces:
TimeValidator
Direct Known Subclasses:
AbstractTimeValidator.DateConstraint, AbstractTimeValidator.LocalDateConstraint, AbstractTimeValidator.LocalDateTimeConstraint, AbstractTimeValidator.LocalTimeConstraint, AbstractTimeValidator.OffsetDateTimeConstraint, AbstractTimeValidator.OffsetTimeConstraint

public abstract class AbstractTimeValidator<T> extends Object implements TimeValidator
  • Field Details

    • timeSource

      protected TimeSource timeSource
    • value

      protected T value
    • checkSeconds

      protected boolean checkSeconds
    • constraints

      protected static Map<Class,TimeValidator> constraints
  • Constructor Details

    • AbstractTimeValidator

      public AbstractTimeValidator(TimeSource timeSource)
  • Method Details

    • isPast

      public boolean isPast()
      Specified by:
      isPast in interface TimeValidator
      Returns:
      true if date or time in the past
    • isPastOrPresent

      public boolean isPastOrPresent()
      Specified by:
      isPastOrPresent in interface TimeValidator
      Returns:
      true if date or time in the past or present
    • isFuture

      public boolean isFuture()
      Specified by:
      isFuture in interface TimeValidator
      Returns:
      true if date or time in the future
    • isFutureOrPresent

      public boolean isFutureOrPresent()
      Specified by:
      isFutureOrPresent in interface TimeValidator
      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 interface TimeValidator
      Parameters:
      checkSeconds - check seconds and nanos option, false by default
    • compareValueWithCurrent

      public abstract int compareValueWithCurrent()