goldman.collection.spatial
Class YComparator

java.lang.Object
  extended by goldman.collection.spatial.YComparator
All Implemented Interfaces:
Comparator<Point>

public class YComparator
extends Object
implements Comparator<Point>

The following YComparator uses the y coordinates to compare points.


Constructor Summary
YComparator()
           
 
Method Summary
 int compare(Point p1, Point p2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

YComparator

public YComparator()
Method Detail

compare

public int compare(Point p1,
                   Point p2)
Specified by:
compare in interface Comparator<Point>
Returns:
a negative value if p1.y < p2.y, zero if p1.y = p2.y, and a positive value if p1.y > p2.y