Treeviz 0.37 2010-10-17

ch.randelshofer.tree.circlemap
Class CircleDistanceComparator

java.lang.Object
  extended by ch.randelshofer.tree.circlemap.CircleDistanceComparator
All Implemented Interfaces:
java.util.Comparator<Circle>

public class CircleDistanceComparator
extends java.lang.Object
implements java.util.Comparator<Circle>

Compares two circles by their distance to the origin (0,0) of the coordinate system.

Author:
Werner Randelshofer  @version 1.0 Jan 17, 2008 Created.

Constructor Summary
CircleDistanceComparator(double cx, double cy)
           
 
Method Summary
 int compare(Circle c1, Circle c2)
           
 
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

CircleDistanceComparator

public CircleDistanceComparator(double cx,
                                double cy)
Method Detail

compare

public int compare(Circle c1,
                   Circle c2)
Specified by:
compare in interface java.util.Comparator<Circle>

Copyright 2007-2008 (c) Werner Randelshofer.
All rights reserved.