JIDE 3.5.15

com.jidesoft.interval
Class ClosedInterval

java.lang.Object
  extended by com.jidesoft.interval.AbstractMutableInterval
      extended by com.jidesoft.interval.ClosedInterval
All Implemented Interfaces:
Interval, MutableInterval
Direct Known Subclasses:
OpenInterval, SimpleBoundedInterval

public class ClosedInterval
extends AbstractMutableInterval

A closed interval is an interval that includes all of its limit points.


Constructor Summary
ClosedInterval(double start, double extent)
           
 
Method Summary
 boolean contains(double value)
          Tests if this interval contains the specified value?
 double getEnd()
           
 double getExtent()
           
 double getStart()
           
 boolean isDegenerate()
          Tests whether the starting and ending values are the same
 boolean overlaps(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.jidesoft.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 Detail

ClosedInterval

public ClosedInterval(double start,
                      double extent)
Method Detail

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()

contains

public boolean contains(double value)
Description copied from interface: Interval
Tests if this interval contains the specified value?

Parameters:
value - the value to test
Returns:
true if the interval contains the value, false otherwise

overlaps

public boolean overlaps(Interval interval)
Description copied from interface: Interval
Tests if this interval overlaps the specified interval.

Parameters:
interval - the interval to test
Returns:
true if this interval overlaps the specified interval, false otherwise

isDegenerate

public boolean isDegenerate()
Description copied from interface: Interval
Tests whether the starting and ending values are the same

Returns:
true if start and end values are identical, false otherwise

toString

public String toString()
Overrides:
toString in class Object

JIDE 3.5.15