Package com.macrofocus.common.interval

# Class SimpleClosedInterval

java.lang.Object
com.macrofocus.common.interval.AbstractMutableInterval
com.macrofocus.common.interval.ClosedInterval
com.macrofocus.common.interval.SimpleClosedInterval

All Implemented Interfaces:
  `Interval`, `MutableInterval`

@JsType public class SimpleClosedInterval extends ClosedInterval
A closed interval is an interval that includes all of its limit points.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleClosedInterval(double start, double extent)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `contains(double value)`
  Tests if this interval contains the specified value
  `boolean`
  `containsInterval(Interval interval)`
  Tests if this interval contains the specified interval
  `boolean`
  `containsStartEnd(double start, double end)`
  Tests if this interval contains the specified interval
  `double`
  `getEnd()`
  `MutableProperty<Double>`
  `getEndProperty()`
  `double`
  `getExtent()`
  `double`
  `getStart()`
  `MutableProperty<Double>`
  `getStartProperty()`
  `boolean`
  `isDegenerate()`
  Tests whether the starting and ending values are the same
  `boolean`
  `isInverted()`
  `boolean`
  `overlaps(double start, double end)`
  Tests if this interval overlaps the specified interval.
  `boolean`
  `overlapsInterval(Interval interval)`
  Tests if this interval overlaps the specified interval.
  `void`
  `setEnd(double value)`
  `void`
  `setExtent(double extent)`
  `void`
  `setStart(double value)`
  `void`
  `setValue(double value, double extent)`
  `String`
  `toString()`

  ### Methods inherited from class com.macrofocus.common.interval.AbstractMutableInterval

  `addIntervalListener, addWeakIntervalListener, notifyIntervalChanged, removeIntervalListener, removeIntervalListeners`

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

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

- ## Constructor Details

  - ### SimpleClosedInterval

    public SimpleClosedInterval(double start, double extent)

- ## Method Details

  - ### getStartProperty

    public MutableProperty<Double> getStartProperty()

  - ### getEndProperty

    public MutableProperty<Double> getEndProperty()

  - ### setStart

    public void setStart(double value)

  - ### setEnd

    public void setEnd(double value)

  - ### setExtent

    public void setExtent(double extent)

  - ### setValue

    public void setValue(double value, double extent)

  - ### getStart

    public double getStart()

  - ### getEnd

    public double getEnd()

  - ### getExtent

    public double getExtent()
    Specified by:
      `getExtent` in interface `Interval`
    Overrides:
      `getExtent` in class `ClosedInterval`

  - ### contains

    @JsIgnore public boolean contains(double value)
    Description copied from interface: `Interval`
    Tests if this interval contains the specified value
    Specified by:
      `contains` in interface `Interval`
    Overrides:
      `contains` in class `ClosedInterval`
    Parameters:
      `value` - the value to test
    Returns:
      true if the interval contains the value, false otherwise

  - ### containsStartEnd

    public boolean containsStartEnd(double start, double end)
    Description copied from interface: `Interval`
    Tests if this interval contains the specified interval
    Specified by:
      `containsStartEnd` in interface `Interval`
    Overrides:
      `containsStartEnd` in class `ClosedInterval`
    Parameters:
      `start` - the value to test
      `end` - the value to test
    Returns:
      true if the interval contains the value, false otherwise

  - ### containsInterval

    @JsIgnore public boolean containsInterval(Interval interval)
    Description copied from interface: `Interval`
    Tests if this interval contains the specified interval
    Specified by:
      `containsInterval` in interface `Interval`
    Overrides:
      `containsInterval` in class `ClosedInterval`
    Parameters:
      `interval` - the interval to test
    Returns:
      true if the interval contains the value, false otherwise

  - ### overlaps

    public boolean overlaps(double start, double end)
    Description copied from interface: `Interval`
    Tests if this interval overlaps the specified interval.
    Specified by:
      `overlaps` in interface `Interval`
    Overrides:
      `overlaps` in class `ClosedInterval`
    Parameters:
      `start` - the interval to test
      `end` - the interval to test
    Returns:
      true if this interval overlaps the specified interval, false otherwise

  - ### overlapsInterval

    @JsIgnore public boolean overlapsInterval(Interval interval)
    Description copied from interface: `Interval`
    Tests if this interval overlaps the specified interval.
    Specified by:
      `overlapsInterval` in interface `Interval`
    Overrides:
      `overlapsInterval` in class `ClosedInterval`
    Parameters:
      `interval` - the interval to test
    Returns:
      true if this interval overlaps the specified interval, false otherwise

  - ### isInverted

    public boolean isInverted()
    Specified by:
      `isInverted` in interface `Interval`
    Overrides:
      `isInverted` in class `ClosedInterval`

  - ### isDegenerate

    public boolean isDegenerate()
    Description copied from interface: `Interval`
    Tests whether the starting and ending values are the same
    Specified by:
      `isDegenerate` in interface `Interval`
    Overrides:
      `isDegenerate` in class `ClosedInterval`
    Returns:
      true if start and end values are identical, false otherwise

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`