org.apache.commons.math3.geometry.euclidean.oned

## Class Interval

- java.lang.Object
- - org.apache.commons.math3.geometry.euclidean.oned.Interval

-     public class Interval
      extends Object

  This class represents a 1D interval.
  Since:
    3.0
  Version:
    $Id: Interval.java 1244107 2012-02-14 16:17:55Z erans $
  See Also:
    `IntervalsSet`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Interval(double lower, double upper)` Simple constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getLength()` Get the length of the interval.
    `double` | `getLower()` Get the lower bound of the interval.
    `double` | `getMidPoint()` Get the midpoint of the interval.
    `double` | `getUpper()` Get the upper bound of the interval.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Interval

          public Interval(double lower,
                  double upper)

      Simple constructor.
      Parameters:
        `lower` - lower bound of the interval
        `upper` - upper bound of the interval

  - ### Method Detail

    - #### getLower

          public double getLower()

      Get the lower bound of the interval.
      Returns:
        lower bound of the interval

    - #### getUpper

          public double getUpper()

      Get the upper bound of the interval.
      Returns:
        upper bound of the interval

    - #### getLength

          public double getLength()

      Get the length of the interval.
      Returns:
        length of the interval

    - #### getMidPoint

          public double getMidPoint()

      Get the midpoint of the interval.
      Returns:
        midpoint of the interval

Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.