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 ofx
andy
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Point
clone()
static int
compare(double x1, double y1, double x2, double y2)
Compare 2 raw point values.int
compareTo(Point other)
boolean
equals(java.lang.Object other)
double
getLatitude()
double
getLongitude()
double
getX()
Get thex
coordinate value for this point.double
getY()
Get they
coordinate value for this point.int
hashCode()
void
setLatitude(double value)
void
setLongitude(double value)
void
setX(double x)
Set thex
coordinate value for this point.void
setY(double y)
Set they
coordinate value for this point.java.lang.String
toString()
static java.lang.String
toString(double x, double y)
Get String representation for raw point value.static Point
valueOf(java.lang.Object value)
Parse value as a 2 double values separated by a comma.static Point
valueOf(java.lang.Object value, char sep)
Parse value as a 2 double values separated bysep
.static Point
valueOf(java.lang.String value)
Parse value as a 2 double values separated by a comma.static Point
valueOf(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 thex
coordinate value for this point.
-
setX
public void setX(double x)
Set thex
coordinate value for this point.
-
getY
public double getY()
Get they
coordinate value for this point.
-
setY
public void setY(double y)
Set they
coordinate value for this point.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(Point other)
- Specified by:
compareTo
in 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:
toString
in 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:
hashCode
in classjava.lang.Object
-
clone
public Point clone()
- Overrides:
clone
in classjava.lang.Object
-
-