public class SpatialDataType extends Object implements DataType
| 构造器和说明 |
|---|
SpatialDataType(int dimensions) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compare(Object a,
Object b)
Compare two keys.
|
boolean |
contains(Object objA,
Object objB)
Check whether a contains b.
|
boolean |
equals(Object a,
Object b)
Check whether two spatial values are equal.
|
float |
getAreaIncrease(Object objA,
Object objB)
Get the area increase by extending a to contain b.
|
int[] |
getExtremes(ArrayList<Object> list)
Get the most extreme pair (elements that are as far apart as possible).
|
int |
getMemory(Object obj)
Estimate the used memory in bytes.
|
void |
increaseBounds(Object bounds,
Object add)
Increase the bounds in the given spatial object.
|
boolean |
isInside(Object objA,
Object objB)
Check whether a is completely inside b and does not touch the
given bound.
|
boolean |
isOverlap(Object objA,
Object objB)
Check whether the two objects overlap.
|
Object |
read(ByteBuffer buff)
Read an object.
|
void |
read(ByteBuffer buff,
Object[] obj,
int len,
boolean key)
Read a list of objects.
|
void |
write(WriteBuffer buff,
Object obj)
Write an object.
|
void |
write(WriteBuffer buff,
Object[] obj,
int len,
boolean key)
Write a list of objects.
|
public boolean equals(Object a, Object b)
a - the first valueb - the second valuepublic void read(ByteBuffer buff, Object[] obj, int len, boolean key)
DataTypepublic void write(WriteBuffer buff, Object[] obj, int len, boolean key)
DataTypepublic void write(WriteBuffer buff, Object obj)
DataTypepublic Object read(ByteBuffer buff)
DataTypepublic boolean isOverlap(Object objA, Object objB)
objA - the first objectobjB - the second objectpublic void increaseBounds(Object bounds, Object add)
bounds - the bounds (may be modified)add - the valuepublic float getAreaIncrease(Object objA, Object objB)
objA - the bounding boxobjB - the objectpublic boolean contains(Object objA, Object objB)
objA - the bounding boxobjB - the objectpublic boolean isInside(Object objA, Object objB)
objA - the object to checkobjB - the boundspublic int[] getExtremes(ArrayList<Object> list)
list - the objectsCopyright © 2017. All rights reserved.