Interface DateRange

All Known Implementing Classes:
AbstractDateRange, SimpleDateRange

public interface DateRange
  • Method Details

    • getKey

      String getKey()
      Returns the identification key, e.g. DAY, MONTH, etc
      Returns:
      identification key
    • getOptMovePeriod

      Optional<Period> getOptMovePeriod()
      Returns the Period to move the date, if any
      Returns:
      Period to move the date
    • getDefaultDescription

      String getDefaultDescription()
      Retunns the default description, e.g. "Day" or "Half year"
      Returns:
      default description
    • calcFor

      Trys to return the calculated DateRangeResult for the supplied date
      Parameters:
      date - date that is used for calculation
      Returns:
      calculated DateRangeResult
    • moveDateRange

      Optional<DateRangeResult> moveDateRange(LocalDate baseDate, int dif)
      Trys to return a moved DateRangeResult
      Parameters:
      baseDate - Date that is used as a base
      dif - Count of moves
      Returns:
      moved DateRangeResult
    • isMovable

      boolean isMovable()
      Returns if the DateRange is movable
      Example:
      • false for TODAY
      • true for MONTH
      • false for FREE
      Returns:
      if the DateRange is movable
    • isCalcable

      boolean isCalcable()
      Returns if the DateRange is calcable
      Example:
      • true for TODAY
      • true for MONTH
      • false for FREE
      Returns:
      if the DateRange is calcable
    • isSettable

      boolean isSettable()
      Returns if the DateRange is settable from a date
      Example:
      • false for TODAY
      • true for MONTH
      • true for FREE
      Returns:
      if the DateRange is settable from a date