public class SpatialDataType extends Object implements DataType
Constructor and Description |
---|
SpatialDataType(int dimensions) |
Modifier and Type | Method and Description |
---|---|
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 int compare(Object a, Object b)
DataType
public boolean equals(Object a, Object b)
a
- the first valueb
- the second valuepublic int getMemory(Object obj)
DataType
public void read(ByteBuffer buff, Object[] obj, int len, boolean key)
DataType
public void write(WriteBuffer buff, Object[] obj, int len, boolean key)
DataType
public void write(WriteBuffer buff, Object obj)
DataType
public Object read(ByteBuffer buff)
DataType
public 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 JBoss by Red Hat. All rights reserved.