Class DateInterval

  • All Implemented Interfaces:
    Serializable

    public final class DateInterval
    extends Object
    implements Serializable
    This class represents date interval. It is a pair of long representing from date 1 to date 2.
    See Also:
    Serialized Form
    • 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​(Object a)
        Override equals
        Overrides:
        equals in class Object
        Parameters:
        a - the object to compare this instance with.
        Returns:
        true if the specified object is equal to this Object; false otherwise.
        See Also:
        Object.hashCode()
      • toString

        public String toString()
        Override toString
        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.