computational.geometry
Class PointComparator

java.lang.Object
  extended by computational.geometry.PointComparator
All Implemented Interfaces:
java.util.Comparator

public class PointComparator
extends java.lang.Object
implements java.util.Comparator

Note: this comparator imposes orderings thar are consistent with equals !


Field Summary
static PointComparator CLOCKWISE_ORDER
           
static PointComparator X_ORDER
           
static PointComparator Y_ORDER
           
 
Method Summary
static PointComparator CLOCKWISE_ORDER(Point origin)
           
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 
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
 

Field Detail

CLOCKWISE_ORDER

public static PointComparator CLOCKWISE_ORDER

X_ORDER

public static PointComparator X_ORDER

Y_ORDER

public static PointComparator Y_ORDER
Method Detail

CLOCKWISE_ORDER

public static PointComparator CLOCKWISE_ORDER(Point origin)

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator