Class Coordinate

java.lang.Object
com.motivewave.platform.sdk.common.Coordinate

public class Coordinate extends Object
Specifies a real point on a graph which includes time (in milliseconds since 1970) and a value (typically price).
  • Constructor Summary

    Constructors
    Constructor
    Description
    Coordinate​(long time, double value)
    Creates a coordinate.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object o)
    Compares this coordinate with the given object and returns true if they are equal.
    long
    Gets the time (in milliseconds since 1970) for this coordinate.
    double
    Gets the value for this coordinate.
    int
     
    Returns a printable string for this coordinate (time, value)

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Coordinate

      public Coordinate(long time, double value)
      Creates a coordinate.
      Parameters:
      time - time value in milliseconds since 1970 (x value)
      value - real value of this coordinate (y value)
  • Method Details

    • getTime

      public long getTime()
      Gets the time (in milliseconds since 1970) for this coordinate.
      Returns:
      time in milliseconds since 1970
    • getValue

      public double getValue()
      Gets the value for this coordinate.
      Returns:
      value (y axis value)
    • equals

      public boolean equals(Object o)
      Compares this coordinate with the given object and returns true if they are equal.
      Overrides:
      equals in class Object
      Parameters:
      o - object to compare to
      Returns:
      true if this object equals the given object
    • toString

      public String toString()
      Returns a printable string for this coordinate (time, value)
      Overrides:
      toString in class Object
      Returns:
      printable string representation of this coordinate
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object