gshute.geom
Class Points

java.lang.Object
  |
  +--gshute.geom.Points

public class Points
extends java.lang.Object

The Points class provides static utility methods for comparing and generating descriptive strings for points.


Field Summary
protected static java.text.DecimalFormat format
          format is the decimal format used to format decimal numbers in the toString(Point2D) method.
 
Method Summary
protected static int sign(double x)
          sign(x) returns -1 if x < 0.0, 0 if x == 0.0, and 1 if x > 0.0.
static java.lang.String toString(java.awt.geom.Point2D p)
          Points.toString(p) returns a String describing p.
static java.util.Comparator xComparator()
          Points.xComparator() returns a comparator that compares points based on their x-coordinate.
static java.util.Comparator yComparator()
          Points.yComparator() returns a comparator that compares points based on their y-coordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format

protected static java.text.DecimalFormat format
format is the decimal format used to format decimal numbers in the toString(Point2D) method.
Method Detail

xComparator

public static java.util.Comparator xComparator()
Points.xComparator() returns a comparator that compares points based on their x-coordinate.

yComparator

public static java.util.Comparator yComparator()
Points.yComparator() returns a comparator that compares points based on their y-coordinate.

toString

public static java.lang.String toString(java.awt.geom.Point2D p)
Points.toString(p) returns a String describing p.

sign

protected static int sign(double x)
sign(x) returns -1 if x < 0.0, 0 if x == 0.0, and 1 if x > 0.0.