DataBounds (OpenMap API)
Date: 2016-12-09

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 DataBounds` | `hardLimits`
`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.geom.Point2D minP, java.awt.geom.Point2D maxP)`

Method Summary
`void` | `add(double x, double y)`
`void` | `add(java.awt.geom.Point2D point)`
`boolean` | `contains(java.awt.geom.Point2D query)`
`boolean` | `equals(java.lang.Object obj)`
`java.awt.geom.Point2D` | `getCenter()`
`DataBounds` | `getHardLimits()`
`double` | `getHeight()`
`java.awt.geom.Point2D` | `getMax()`
`java.awt.geom.Point2D` | `getMin()`
`double` | `getWidth()`
`int` | `hashCode()`
`boolean` | `intersects(DataBounds db2)`
`boolean` | `isyDirUp()`
`void` | `setHardLimits(DataBounds hardLimits)`
`protected double` | `setInRange(double hi, double lo, double val)` Make sure the value is within the range.
`void` | `setyDirUp(boolean yDirUp)`
`java.lang.String` | `toString()`

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

Field Detail

### min

    protected java.awt.geom.Point2D min

### max

    protected java.awt.geom.Point2D max

### hardLimits

    protected DataBounds hardLimits

Constructor Detail

### DataBounds

    public DataBounds()

### DataBounds

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

### DataBounds

    public DataBounds(java.awt.geom.Point2D minP,
                      java.awt.geom.Point2D 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()

  Overrides:
    `toString` in class `java.lang.Object`

### getMax

    public java.awt.geom.Point2D getMax()

  Returns:
    upper right point

### getMin

    public java.awt.geom.Point2D getMin()

  Returns:
    lower left point

### add

    public void add(double x,
                    double y)

### setInRange

    protected double setInRange(double hi,
                                double lo,
                                double val)

  Make sure the value is within the range.

  Parameters:
    `hi` - high range value
    `lo` - low range value
    `val` - testing value
  Returns:
    the value, adjusted if necessary.

### add

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

### contains

    public boolean contains(java.awt.geom.Point2D query)

### getWidth

    public double getWidth()

### getHeight

    public double getHeight()

### getHardLimits

    public DataBounds getHardLimits()

### setHardLimits

    public void setHardLimits(DataBounds hardLimits)

### isyDirUp

    public boolean isyDirUp()

### setyDirUp

    public void setyDirUp(boolean yDirUp)

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### intersects

    public boolean intersects(DataBounds db2)

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