gshute.geom
Class Lines

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

public class Lines
extends java.lang.Object

The Lines class provides static utility methods for comparing and generating descriptive strings for lines.


Field Summary
protected static java.text.DecimalFormat format
          format is the decimal format used to format decimal numbers in the toString(Line2D) method.
 
Method Summary
static java.util.Comparator firstXComparator()
          Lines.firstXComparator() returns a comparator that compares lines based on their first endpoint x-coordinate.
static java.util.Comparator firstYComparator()
          Lines.firstYComparator() returns a comparator that compares lines based on their first endpoint y-coordinate.
static java.util.Comparator secondXComparator()
          Lines.secondXComparator() returns a comparator that compares lines based on their second endpoint x-coordinate.
static java.util.Comparator secondYComparator()
          Lines.secondYComparator() returns a comparator that compares lines based on their second endpoint y-coordinate.
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.Line2D l)
          Lines.toString(l) returns a String describing l.
 
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(Line2D) method.
Method Detail

firstXComparator

public static java.util.Comparator firstXComparator()
Lines.firstXComparator() returns a comparator that compares lines based on their first endpoint x-coordinate.

secondXComparator

public static java.util.Comparator secondXComparator()
Lines.secondXComparator() returns a comparator that compares lines based on their second endpoint x-coordinate.

firstYComparator

public static java.util.Comparator firstYComparator()
Lines.firstYComparator() returns a comparator that compares lines based on their first endpoint y-coordinate.

secondYComparator

public static java.util.Comparator secondYComparator()
Lines.secondYComparator() returns a comparator that compares lines based on their second endpoint y-coordinate.

toString

public static java.lang.String toString(java.awt.geom.Line2D l)
Lines.toString(l) returns a String describing l.

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.