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.
| Modifier and Type | Field and Description |
|---|---|
| public boolean | isNull
True if the point represents |
| public double | x
The X coordinate of the point. |
| public double | y
The Y coordinate of the point. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | clone()
Overrides org. This must be overridden to allow the object to be cloned. |
| public boolean | Returns: true if the two points are identicalObject to compare with obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public @Nullable String | Returns: the PGpoint in the syntax expected by org.postgresqlOverrides org. This must be overridden, to return the value of the object, in the form required by org.postgresql. |
| public int | |
| public int | lengthInBytes()
Implements org. This method is called to return the number of bytes needed to store this object in the binary form required by org.postgresql. |
| public void | |
| public void | move(double
double coordinate x, double double coordinate y)Moves the point to the supplied coordinates. |
| public void | setByteValue(byte[]
Definition of this point in PostgreSQL's binary syntax b, int the offset in the byte array where object data starts offset)Implements org. This method is called to set the value of this object. |
| public void | setLocation(int
integer coordinate x, int integer coordinate y)Moves the point to the supplied coordinates. |
| public void | setLocation(Point
Point to move to p)
Deprecated
Will be removed for avoiding a dependency to the
java.desktop module.
Moves the point to the supplied java.awt.Point refer to java.awt.Point for description of this. |
| public void | |
| public void | toBytes(byte[]
the array to store the value, it is guaranteed to be at lest
b, int lengthInBytes in size.the offset in the byte array where object must be stored offset)Implements org. Populate the byte array with PGpoint in the binary syntax expected by org.postgresql. |
| public void | translate(int
integer amount to add on the x axis x, int integer amount to add on the y axis y)Translate the point by the supplied amount. |
| public void | translate(double
double amount to add on the x axis x, double double amount to add on the y axis y)Translate the point by the supplied amount. |
| isNull | back to summary |
|---|---|
| public boolean isNull True if the point represents | |
| x | back to summary |
|---|---|
| public double x The X coordinate of the point. | |
| y | back to summary |
|---|---|
| public double y The Y coordinate of the point. | |
| PGpoint | back to summary |
|---|---|
public PGpoint(double x, double y)
| |
| PGpoint | back to summary |
|---|---|
| public PGpoint(String value) throws SQLException This is called mainly from the other geometric types, when a point is embedded within their definition.
| |
| PGpoint | back to summary |
|---|---|
| public PGpoint() Required by the driver. | |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides org. Doc from org. This must be overridden to allow the object to be cloned.
| |
| equals | back to summary |
|---|---|
| public boolean equals(@Nullable Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getValue | back to summary |
|---|---|
| public @Nullable String getValue() Overrides org. Doc from org. This must be overridden, to return the value of the object, in the form required by org.postgresql. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from org. Compute hash. As equals() use only value. Return the same hash for the same value.
| |
| lengthInBytes | back to summary |
|---|---|
| public int lengthInBytes() Implements org. Doc from org. This method is called to return the number of bytes needed to store this object in the binary form required by org.postgresql.
| |
| move | back to summary |
|---|---|
| public void move(int x, int y) Moves the point to the supplied coordinates.
| |
| move | back to summary |
|---|---|
| public void move(double x, double y) Moves the point to the supplied coordinates.
| |
| setByteValue | back to summary |
|---|---|
| public void setByteValue(byte[] b, int offset) Implements org. Doc from org. This method is called to set the value of this object.
| |
| setLocation | back to summary |
|---|---|
| public void setLocation(int x, int y) Moves the point to the supplied coordinates. refer to java.awt.Point for description of this.
| |
| setLocation | back to summary |
|---|---|
| public void setLocation(Point p)
Deprecated Will be removed for avoiding a dependency to the Moves the point to the supplied java.awt.Point refer to java.awt.Point for description of this.
| |
| setValue | back to summary |
|---|---|
public void setValue(@Nullable String s) throws SQLException
| |
| toBytes | back to summary |
|---|---|
| public void toBytes(byte[] b, int offset) Implements org. Populate the byte array with PGpoint in the binary syntax expected by org.postgresql.
| |
| translate | back to summary |
|---|---|
| public void translate(int x, int y) Translate the point by the supplied amount.
| |
| translate | back to summary |
|---|---|
| public void translate(double x, double y) Translate the point by the supplied amount.
| |