Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.util
Class DataBounds

    java.lang.Object
      com.bbn.openmap.util.DataBounds

public class DataBounds
extends java.lang.Object

A simple utility class that holds a min, max for a group of points.

Field Summary
`protected java.awt.geom.Point2D` | `max`
`protected java.awt.geom.Point2D` | `min`

Constructor Summary
`DataBounds()`
`DataBounds(double minx, double miny, double maxx, double maxy)`
`DataBounds(java.awt.Point minP, java.awt.Point maxP)`

Method Summary
`void` | `add(double x, double y)`
`void` | `add(java.awt.geom.Point2D point)`
`java.awt.geom.Point2D` | `getCenter()` Returns a point set to the average of the min and max values.
`java.awt.geom.Point2D` | `getMax()` Upper right point.
`java.awt.geom.Point2D` | `getMin()` Lower left point.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### min

    protected java.awt.geom.Point2D min

### max

    protected java.awt.geom.Point2D max

Constructor Detail

### DataBounds

    public DataBounds()

### DataBounds

    public DataBounds(double minx,
                      double miny,
                      double maxx,
                      double maxy)

### DataBounds

    public DataBounds(java.awt.Point minP,
                      java.awt.Point maxP)

Method Detail

### getCenter

    public java.awt.geom.Point2D getCenter()

  Returns a point set to the average of the min and max values. May return null if no points have been added.

### toString

    public java.lang.String toString()

### getMax

    public java.awt.geom.Point2D getMax()

  Upper right point.

### getMin

    public java.awt.geom.Point2D getMin()

  Lower left point.

### add

    public void add(double x,
                    double y)

### add

    public void add(java.awt.geom.Point2D point)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details