Class ValidatorInstantBefore

All Implemented Interfaces:
io.github.mmm.base.lang.Composable<Validator<?>>, Validator<Instant>, Iterable<Validator<?>>

public class ValidatorInstantBefore extends ValidatorTemporalBefore<Instant>
Implementation of ValidatorTemporalBefore for Instant.
Since:
1.0.0
  • Constructor Details

    • ValidatorInstantBefore

      public ValidatorInstantBefore(Supplier<Instant> valueSource)
      The constructor.
      Parameters:
      valueSource - the Supplier of the value to compare to.
    • ValidatorInstantBefore

      public ValidatorInstantBefore(Instant value)
      The constructor.
      Parameters:
      value - the value to compare to.
  • Method Details

    • isBefore

      protected boolean isBefore(Instant value, Instant limit)
      Specified by:
      isBefore in class ValidatorTemporalBefore<Instant>
      Parameters:
      value - the date to check.
      limit - the upper bound to compare to.
      Returns:
      true if value is before limit, false otherwise.