Class DoublePoint

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

public class DoublePoint extends Object implements Point
Basic Point implementation backed by double values, for use with LTThreeBuckets.sorted(java.util.List<T>, int).
  • Constructor Details

    • DoublePoint

      public DoublePoint(double x, double y)
      Creates a new DoublePoint with the provided x and y 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 accepts abstract Number 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()
      Returns the x horizontal (time) value of this point.
      Specified by:
      getX in interface Point
      Returns:
      the x horizontal (time) value of this point
    • getY

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

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