Building Parsers with Java

sjm.examples.sling
Class Extrema

java.lang.Object
  |
  +--sjm.examples.sling.Extrema

public class Extrema
extends java.lang.Object

This class holds onto two points, so that methods that find a maximum and minimum value over some range can return both points as a single Extrema.


Field Summary
 Point max
           
 Point min
           
 
Constructor Summary
Extrema(Point min, Point max)
          Creates a pair of points as a single value.
 
Method Summary
 double aspectRatio()
          Return the ratio of the width of the extremes to the height of the extremes.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

min

public final Point min

max

public final Point max
Constructor Detail

Extrema

public Extrema(Point min,
               Point max)
Creates a pair of points as a single value.
Method Detail

aspectRatio

public double aspectRatio()
Return the ratio of the width of the extremes to the height of the extremes.
Returns:
the ratio of the width of the extremes to the height of the extremes

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

by Steve Metsker