
public final class SpatialComparator extends Object implements Comparator<SpatialComparable>
| Modifier and Type | Field and Description |
|---|---|
private int |
compareDimension
The dimension for comparison.
|
private int |
comparisonValue
Indicates the comparison value (min or max).
|
static int |
MAX
Indicates the comparison of the max values of the entries' MBRs.
|
static int |
MIN
Indicates the comparison of the min values of the entries' MBRs.
|
| Constructor and Description |
|---|
SpatialComparator(int compareDimension,
int comparisonValue)
Creates a new spatial comparator with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(SpatialComparable o1,
SpatialComparable o2)
Compares the two specified spatial comparables according to the sorting
dimension and the comparison value of this Comparator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic static final int MIN
public static final int MAX
private final int compareDimension
private final int comparisonValue
public SpatialComparator(int compareDimension,
int comparisonValue)
compareDimension - the dimension to be set for comparisoncomparisonValue - the comparison value to be setpublic int compare(SpatialComparable o1, SpatialComparable o2)
compare in interface Comparator<SpatialComparable>o1 - the first spatial comparableo2 - the second spatial comparable