Package org.h2.mvstore.rtree
Class DefaultSpatial
java.lang.Object
org.h2.mvstore.rtree.DefaultSpatial
- All Implemented Interfaces:
Spatial
Class BasicSpatialImpl.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefaultSpatial
(long id, float... minMax) Create a new key.private
DefaultSpatial
(long id, DefaultSpatial other) -
Method Summary
Modifier and TypeMethodDescriptionclone
(long id) Creates a copy of this Spatial object with different id.boolean
Check whether two objects are equals, but do not compare the id fields.long
getId()
Get id of this Spatial objectboolean
isNull()
Test whether this object has no valuefloat
max
(int dim) Get the maximum value for the given dimension.float
min
(int dim) Get the minimum value for the given dimension.void
setMax
(int dim, float x) Set the maximum value for the given dimension.void
setMin
(int dim, float x) Set the minimum value for the given dimension.
-
Field Details
-
id
private final long id -
minMax
private final float[] minMax
-
-
Constructor Details
-
DefaultSpatial
public DefaultSpatial(long id, float... minMax) Create a new key.- Parameters:
id
- the idminMax
- min x, max x, min y, max y, and so on
-
DefaultSpatial
-
-
Method Details
-
min
public float min(int dim) Description copied from interface:Spatial
Get the minimum value for the given dimension. -
setMin
public void setMin(int dim, float x) Description copied from interface:Spatial
Set the minimum value for the given dimension. -
max
public float max(int dim) Description copied from interface:Spatial
Get the maximum value for the given dimension. -
setMax
public void setMax(int dim, float x) Description copied from interface:Spatial
Set the maximum value for the given dimension. -
clone
Description copied from interface:Spatial
Creates a copy of this Spatial object with different id. -
getId
public long getId()Description copied from interface:Spatial
Get id of this Spatial object -
isNull
public boolean isNull()Description copied from interface:Spatial
Test whether this object has no value -
equalsIgnoringId
Description copied from interface:Spatial
Check whether two objects are equals, but do not compare the id fields.- Specified by:
equalsIgnoringId
in interfaceSpatial
- Parameters:
o
- the other key- Returns:
- true if the contents are the same
-