Package com.attivio.sdk.geo
Class Point
- java.lang.Object
-
- com.attivio.sdk.geo.Point
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Comparable<Point>
public class Point extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable<Point>, java.io.Serializable
Represents an x,y pair of doubles.This x,y pair can be used to represent coordinates for geo-based or other calculations.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Point(double x, double y)Create a new point with coordinate value composed ofxandy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Pointclone()static intcompare(double x1, double y1, double x2, double y2)Compare 2 raw point values.intcompareTo(Point other)booleanequals(java.lang.Object other)doublegetLatitude()doublegetLongitude()doublegetX()Get thexcoordinate value for this point.doublegetY()Get theycoordinate value for this point.inthashCode()voidsetLatitude(double value)voidsetLongitude(double value)voidsetX(double x)Set thexcoordinate value for this point.voidsetY(double y)Set theycoordinate value for this point.java.lang.StringtoString()static java.lang.StringtoString(double x, double y)Get String representation for raw point value.static PointvalueOf(java.lang.Object value)Parse value as a 2 double values separated by a comma.static PointvalueOf(java.lang.Object value, char sep)Parse value as a 2 double values separated bysep.static PointvalueOf(java.lang.String value)Parse value as a 2 double values separated by a comma.static PointvalueOf(java.lang.String value, char sep)Parse value as a 2 double values separated bysep.
-
-
-
Method Detail
-
getLongitude
public double getLongitude()
-
setLongitude
public void setLongitude(double value)
-
getLatitude
public double getLatitude()
-
setLatitude
public void setLatitude(double value)
-
getX
public double getX()
Get thexcoordinate value for this point.
-
setX
public void setX(double x)
Set thexcoordinate value for this point.
-
getY
public double getY()
Get theycoordinate value for this point.
-
setY
public void setY(double y)
Set theycoordinate value for this point.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(Point other)
- Specified by:
compareToin interfacejava.lang.Comparable<Point>
-
compare
public static int compare(double x1, double y1, double x2, double y2)Compare 2 raw point values.
-
valueOf
public static Point valueOf(java.lang.Object value)
Parse value as a 2 double values separated by a comma.
-
valueOf
public static Point valueOf(java.lang.Object value, char sep)
Parse value as a 2 double values separated bysep.
-
valueOf
public static Point valueOf(java.lang.String value)
Parse value as a 2 double values separated by a comma.
-
valueOf
public static Point valueOf(java.lang.String value, char sep)
Parse value as a 2 double values separated bysep.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public static java.lang.String toString(double x, double y)Get String representation for raw point value.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
clone
public Point clone()
- Overrides:
clonein classjava.lang.Object
-
-