Package org.h2.mvstore.rtree
Interface Spatial
- All Known Implementing Classes:
SpatialKey
public interface Spatial
Interface Spatial represents boxes in 2+ dimensional space,
where total ordering is not that straight-forward.
They can be used as keys for MVRTree.
-
Method Summary
Modifier and TypeMethodDescriptionclone(long id) Creates a copy of this Spatial object with different id.booleanCheck whether two objects are equals, but do not compare the id fields.longgetId()Get id of this Spatial objectbooleanisNull()Test whether this object has no valuefloatmax(int dim) Get the maximum value for the given dimension.floatmin(int dim) Get the minimum value for the given dimension.voidsetMax(int dim, float x) Set the maximum value for the given dimension.voidsetMin(int dim, float x) Set the minimum value for the given dimension.
-
Method Details
-
min
float min(int dim) Get the minimum value for the given dimension.- Parameters:
dim- the dimension- Returns:
- the value
-
setMin
void setMin(int dim, float x) Set the minimum value for the given dimension.- Parameters:
dim- the dimensionx- the value
-
max
float max(int dim) Get the maximum value for the given dimension.- Parameters:
dim- the dimension- Returns:
- the value
-
setMax
void setMax(int dim, float x) Set the maximum value for the given dimension.- Parameters:
dim- the dimensionx- the value
-
clone
Creates a copy of this Spatial object with different id.- Parameters:
id- for the new Spatial object- Returns:
- a clone
-
getId
long getId()Get id of this Spatial object- Returns:
- id
-
isNull
boolean isNull()Test whether this object has no value- Returns:
- true if it is NULL, false otherwise
-
equalsIgnoringId
Check whether two objects are equals, but do not compare the id fields.- Parameters:
o- the other key- Returns:
- true if the contents are the same
-