|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XYComparator<T>
The XYComparator
interface is used by the quad tree implementation to determine
which quadrant a point belongs.
Method Summary | |
---|---|
double |
compareX(T a,
T b)
Compares a and b according to their x-coordinates. |
double |
compareY(T a,
T b)
Compares a and b according to their y-coordinates. |
double |
getX(T item)
Returns the x-coordinate of the given item. |
double |
getY(T item)
Returns the y-coordinate of the given item. |
int |
quadrant(T origin,
T item)
Returns the quadrant for the given item with respect to the given origin where 0 indicates lower left, 1 indicates lower right, 2 indicates upper right, 3 indicates upper left, and 4 indicates the item is at the origin. |
Methods inherited from interface java.util.Comparator |
---|
compare, equals |
Method Detail |
---|
double getX(T item)
double getY(T item)
double compareX(T a, T b)
double compareY(T a, T b)
int quadrant(T origin, T item)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |