Class DateInterval


  • public class DateInterval
    extends java.lang.Object
    DateInterval, This class represents an interval between two dates.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.time.LocalDate firstDate
      firstDate, This is the first date in the interval.
      java.time.LocalDate lastDate
      lastDate, This is the last date in the interval.
    • Constructor Summary

      Constructors 
      Constructor Description
      DateInterval()
      Constructor (Empty), This will create an empty DateInterval instance.
      DateInterval​(java.time.LocalDate intervalStart, java.time.LocalDate intervalEnd)
      Constructor (Normal), This will create a date interval using the supplied dates.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEmpty()
      isEmpty, This will return true if both dates are null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • firstDate

        public java.time.LocalDate firstDate
        firstDate, This is the first date in the interval.
      • lastDate

        public java.time.LocalDate lastDate
        lastDate, This is the last date in the interval.
    • Constructor Detail

      • DateInterval

        public DateInterval()
        Constructor (Empty), This will create an empty DateInterval instance. An empty date interval has both dates set to null.
      • DateInterval

        public DateInterval​(java.time.LocalDate intervalStart,
                            java.time.LocalDate intervalEnd)
        Constructor (Normal), This will create a date interval using the supplied dates.
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        isEmpty, This will return true if both dates are null. Otherwise, this returns false.