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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this coordinate with the given object and returns true if they are equal.long
getTime()
Gets the time (in milliseconds since 1970) for this coordinate.double
getValue()
Gets the value for this coordinate.int
hashCode()
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
-
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
Compares this coordinate with the given object and returns true if they are equal. -
toString
Returns a printable string for this coordinate (time, value) -
hashCode
public int hashCode() -
toJson
-