Class DateInterval

  • All Implemented Interfaces:
    java.io.Serializable

    public final class DateInterval
    extends java.lang.Object
    implements java.io.Serializable
    This class represents date interval. It is a pair of long representing from date 1 to date 2.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DateInterval​(long from, long to)
      Constructor given from date and to date.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object a)
      Override equals
      long getFromDate()
      Get the from date.
      long getToDate()
      Get the to date.
      int hashCode()
      Override hashcode
      java.lang.String toString()
      Override toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • fromDate

        private final long fromDate
      • toDate

        private final long toDate
    • Constructor Detail

      • DateInterval

        public DateInterval​(long from,
                            long to)
        Constructor given from date and to date.
        Parameters:
        from - The from date in date interval.
        to - The to date in date interval.
    • Method Detail

      • getFromDate

        public long getFromDate()
        Get the from date.
        Returns:
        the from date in dateInterval.
      • getToDate

        public long getToDate()
        Get the to date.
        Returns:
        the to date in dateInterval.
      • equals

        public boolean equals​(java.lang.Object a)
        Override equals
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Override hashcode
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Override toString
        Overrides:
        toString in class java.lang.Object