Algorithm
Development Kit 1.0

algs.model
Interface IPoint

All Known Implementing Classes:
TwoDPoint

public interface IPoint

A point has an x- and y-coordinate over the cartesian plane. Classes that implement this interface must provide accurate Object.equals(Object) and Object.hashCode() methods. To be useful during debugging, one should also have a meaningful Object.toString() method.

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Field Summary
static java.util.Comparator<IPoint> xy_sorter
          Globally useful sorter, that first sorts by x, and then by y coordinate.
 
Method Summary
 double getX()
          return the x-coordinate value for the given point.
 double getY()
          return the y-coordinate value for the given point.
 

Field Detail

xy_sorter

static final java.util.Comparator<IPoint> xy_sorter
Globally useful sorter, that first sorts by x, and then by y coordinate. Useful for determining full ordering of IPoint objects over a Cartesian Plane.

Method Detail

getX

double getX()
return the x-coordinate value for the given point.


getY

double getY()
return the y-coordinate value for the given point.


Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.