Package org.postgresql.geometric
Class PGbox
- java.lang.Object
-
- org.postgresql.util.PGobject
-
- org.postgresql.geometric.PGbox
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.postgresql.util.PGBinaryObject
public class PGbox extends PGobject implements org.postgresql.util.PGBinaryObject, java.io.Serializable, java.lang.Cloneable
This represents the box datatype within org.postgresql.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()This must be overidden to allow the object to be clonedbooleanequals(java.lang.Object obj)This must be overidden to allow comparisons of objectsjava.lang.StringgetValue()This must be overidden, to return the value of the object, in the form required by org.postgresql.inthashCode()Compute hash.intlengthInBytes()voidsetByteValue(byte[] b, int offset)voidsetValue(java.lang.String value)This method sets the value of this object.voidtoBytes(byte[] bytes, int offset)
-
-
-
Field Detail
-
point
public PGpoint[] point
These are the two points.
-
-
Constructor Detail
-
PGbox
public PGbox(double x1, double y1, double x2, double y2)- Parameters:
x1- first x coordinatey1- first y coordinatex2- second x coordinatey2- second y coordinate
-
PGbox
public PGbox(java.lang.String s) throws java.sql.SQLException- Parameters:
s- Box definition in PostgreSQL syntax- Throws:
java.sql.SQLException- if definition is invalid
-
PGbox
public PGbox()
Required constructor
-
-
Method Detail
-
setValue
public void setValue(java.lang.String value) throws java.sql.SQLExceptionThis method sets the value of this object. It should be overidden, but still called by subclasses.
-
setByteValue
public void setByteValue(byte[] b, int offset)- Specified by:
setByteValuein interfaceorg.postgresql.util.PGBinaryObject- Parameters:
b- Definition of this point in PostgreSQL's binary syntax
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:PGobjectThis must be overidden to allow comparisons of objects
-
hashCode
public int hashCode()
Description copied from class:PGobjectCompute hash. As equals() use only value. Return the same hash for the same value.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from class:PGobjectThis must be overidden to allow the object to be cloned
-
getValue
public java.lang.String getValue()
Description copied from class:PGobjectThis must be overidden, to return the value of the object, in the form required by org.postgresql.
-
lengthInBytes
public int lengthInBytes()
- Specified by:
lengthInBytesin interfaceorg.postgresql.util.PGBinaryObject
-
toBytes
public void toBytes(byte[] bytes, int offset)- Specified by:
toBytesin interfaceorg.postgresql.util.PGBinaryObject
-
-