Class LocalDateDoublePoint

    • Method Detail

      • of

        public static LocalDateDoublePoint of​(LocalDate date,
                                              double value)
        Obtains a point from date and value.
        Parameters:
        date - the date
        value - the value
        Returns:
        the point
      • getDate

        public LocalDate getDate()
        Gets the date.
        Returns:
        the date
      • getValue

        public double getValue()
        Gets the value.
        Returns:
        the value
      • withDate

        public LocalDateDoublePoint withDate​(LocalDate date)
        Returns a copy of this point with another date.
        Parameters:
        date - the date to change the point to
        Returns:
        a point based on this point with the date changed
      • withValue

        public LocalDateDoublePoint withValue​(double value)
        Returns a copy of this point with another value.
        Parameters:
        value - the value to change the point to
        Returns:
        a point based on this point with the value changed
      • compareTo

        public int compareTo​(LocalDateDoublePoint other)
        Compares this point to another.

        The sort order is by date, then by double. This is compatible with equals.

        Specified by:
        compareTo in interface Comparable<LocalDateDoublePoint>
        Parameters:
        other - the other point
        Returns:
        negative if this is less than, zero if equal, positive if greater than
      • equals

        public boolean equals​(Object obj)
        Checks if this point is equal to another point.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to check, null returns false
        Returns:
        true if this is equal to the other point
      • hashCode

        public int hashCode()
        A hash code for this point.
        Overrides:
        hashCode in class Object
        Returns:
        a suitable hash code
      • toString

        public String toString()
        Returns a string representation of the point.
        Overrides:
        toString in class Object
        Returns:
        the string