Class Coordinate
java.lang.Object
com.motivewave.platform.sdk.common.Coordinate
Specifies a real point on a graph which includes time (in milliseconds since 1970) and a value (typically price).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this coordinate with the given object and returns true if they are equal.static CoordinatelonggetTime()Gets the time (in milliseconds since 1970) for this coordinate.doublegetValue()Gets the value for this coordinate.inthashCode()toJson()toString()Returns a printable string for this coordinate (time, value)
-
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
-
fromJson
-
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
-
toString
-
hashCode
-
toJson
-