| java.lang.Object org.postgresql.util.PGobject org.postgresql.geometric.PGpoint
PGpoint | public class PGpoint extends PGobject implements Serializable,Cloneable(Code) | | It maps to the point datatype in org.postgresql.
This implements a version of java.awt.Point, except it uses double
to represent the coordinates.
|
Field Summary | |
public double | x | public double | y |
Constructor Summary | |
public | PGpoint(double x, double y) | public | PGpoint(String value) This is called mainly from the other geometric types, when a
point is embedded within their definition. | public | PGpoint() |
Method Summary | |
public boolean | equals(Object obj) | public String | getValue() | public int | hashCode() | public void | move(int x, int y) Moves the point to the supplied coordinates. | public void | move(double x, double y) Moves the point to the supplied coordinates. | public void | setLocation(int x, int y) Moves the point to the supplied coordinates. | public void | setLocation(Point p) | public void | setValue(String s) | public void | translate(int x, int y) Translate the point by the supplied amount. | public void | translate(double x, double y) Translate the point by the supplied amount. |
x | public double x(Code) | | The X coordinate of the point
|
y | public double y(Code) | | The Y coordinate of the point
|
PGpoint | public PGpoint(double x, double y)(Code) | | Parameters: x - coordinate Parameters: y - coordinate |
PGpoint | public PGpoint(String value) throws SQLException(Code) | | This is called mainly from the other geometric types, when a
point is embedded within their definition.
Parameters: value - Definition of this point in PostgreSQL's syntax |
PGpoint | public PGpoint()(Code) | | Required by the driver
|
equals | public boolean equals(Object obj)(Code) | | Parameters: obj - Object to compare with true if the two points are identical |
getValue | public String getValue()(Code) | | the PGpoint in the syntax expected by org.postgresql |
hashCode | public int hashCode()(Code) | | |
move | public void move(int x, int y)(Code) | | Moves the point to the supplied coordinates.
Parameters: x - integer coordinate Parameters: y - integer coordinate |
move | public void move(double x, double y)(Code) | | Moves the point to the supplied coordinates.
Parameters: x - double coordinate Parameters: y - double coordinate |
setLocation | public void setLocation(int x, int y)(Code) | | Moves the point to the supplied coordinates.
refer to java.awt.Point for description of this
Parameters: x - integer coordinate Parameters: y - integer coordinate See Also: java.awt.Point |
setLocation | public void setLocation(Point p)(Code) | | Moves the point to the supplied java.awt.Point
refer to java.awt.Point for description of this
Parameters: p - Point to move to See Also: java.awt.Point |
translate | public void translate(int x, int y)(Code) | | Translate the point by the supplied amount.
Parameters: x - integer amount to add on the x axis Parameters: y - integer amount to add on the y axis |
translate | public void translate(double x, double y)(Code) | | Translate the point by the supplied amount.
Parameters: x - double amount to add on the x axis Parameters: y - double amount to add on the y axis |
|
|