Class DoublePoint

java.lang.Object
com.ggalmazor.ltdownsampling.DoublePoint
All Implemented Interfaces:
Point

public class DoublePoint extends Object implements Point
This class provides a basic Point implementation on Double values to be used with LTThreeBuckets.sorted(java.util.List<T>, int).
  • Constructor Details

    • DoublePoint

      public DoublePoint(double x, double y)
      Returns a new DoublePoint with the provided x, and y Double values
      Parameters:
      x - the double value of the point in the horizontal dimension (time)
      y - the double value of the point in the vertical dimension
  • Method Details

    • of

      public static DoublePoint of(Number x, Number y)
      Utility factory for DoublePoint that takes abstract Number x and y values
      Parameters:
      x - the value of the point in the horizontal dimension (time)
      y - the value of the point in the vertical dimension
      Returns:
      the new DoublePoint instance
    • getX

      public double getX()
      Specified by:
      getX in interface Point
      Returns:
      the x horizontal (time) value of this point
    • getY

      public double getY()
      Specified by:
      getY in interface Point
      Returns:
      the y vertical value of this point
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the text representation of this point