|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.mvstore.rtree.SpatialType
public class SpatialType
A spatial data type. This class supports up to 255 dimensions. Each dimension can have a minimum and a maximum value of type float. For each dimension, the maximum value is only stored when it is not the same as the minimum.
| Constructor Summary | |
|---|---|
SpatialType(int dimensions)
|
|
| Method Summary | |
|---|---|
java.lang.String |
asString()
Get the stable string representation that is used to build this data type. |
int |
compare(java.lang.Object a,
java.lang.Object b)
Compare two keys. |
boolean |
contains(java.lang.Object objA,
java.lang.Object objB)
Check whether a contains b. |
boolean |
equals(java.lang.Object a,
java.lang.Object b)
Check whether two spatial values are equal. |
static SpatialType |
fromString(java.lang.String s)
Read a value from a string. |
float |
getAreaIncrease(java.lang.Object objA,
java.lang.Object objB)
Get the area increase by extending a to contain b. |
int[] |
getExtremes(java.util.ArrayList<java.lang.Object> list)
Get the most extreme pair (elements that are as far apart as possible). |
int |
getMaxLength(java.lang.Object obj)
Get the maximum length in bytes used to store an object. |
int |
getMemory(java.lang.Object obj)
Estimate the used memory in bytes. |
void |
increaseBounds(java.lang.Object bounds,
java.lang.Object add)
Increase the bounds in the given spatial object. |
boolean |
isInside(java.lang.Object objA,
java.lang.Object objB)
Check whether a is completely inside b and does not touch the given bound. |
boolean |
isOverlap(java.lang.Object objA,
java.lang.Object objB)
Check whether the two objects overlap. |
java.lang.Object |
read(java.nio.ByteBuffer buff)
Read an object. |
void |
write(java.nio.ByteBuffer buff,
java.lang.Object obj)
Write the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpatialType(int dimensions)
| Method Detail |
|---|
public static SpatialType fromString(java.lang.String s)
s - the string
public int compare(java.lang.Object a,
java.lang.Object b)
DataType
compare in interface DataTypea - the first keyb - the second key
public boolean equals(java.lang.Object a,
java.lang.Object b)
a - the first valueb - the second value
public int getMaxLength(java.lang.Object obj)
DataType
getMaxLength in interface DataTypeobj - the object
public int getMemory(java.lang.Object obj)
DataType
getMemory in interface DataTypeobj - the object
public void write(java.nio.ByteBuffer buff,
java.lang.Object obj)
DataType
write in interface DataTypebuff - the target bufferobj - the valuepublic java.lang.Object read(java.nio.ByteBuffer buff)
DataType
read in interface DataTypebuff - the source buffer
public java.lang.String asString()
DataTypeTo avoid conflict with the default factory, the returned string should start with the package name of the type factory.
asString in interface DataType
public boolean isOverlap(java.lang.Object objA,
java.lang.Object objB)
objA - the first objectobjB - the second object
public void increaseBounds(java.lang.Object bounds,
java.lang.Object add)
bounds - the bounds (may be modified)add - the value
public float getAreaIncrease(java.lang.Object objA,
java.lang.Object objB)
objA - the bounding boxobjB - the object
public boolean contains(java.lang.Object objA,
java.lang.Object objB)
objA - the bounding boxobjB - the object
public boolean isInside(java.lang.Object objA,
java.lang.Object objB)
objA - the object to checkobjB - the bounds
public int[] getExtremes(java.util.ArrayList<java.lang.Object> list)
list - the objects
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||