physics
Class IntervalList
java.lang.Object
physics.IntervalList
- All Implemented Interfaces:
- java.io.Serializable
public class IntervalList
- extends java.lang.Object
- implements java.io.Serializable
An IntervalList is a mutable abstraction of a set of ranges of
continuous numbers.
- See Also:
- Serialized Form
|
Nested Class Summary |
static class |
IntervalList.Interval
An Interval is an immutable representation of a single contigous
range of numbers from start to end. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
IntervalList
public IntervalList(double start,
double end)
IntervalList
public IntervalList()
IntervalList
public IntervalList(IntervalList il)
isEmpty
public boolean isEmpty()
min
public double min()
max
public double max()
addInterval
public void addInterval(double start,
double end)
removeInterval
public void removeInterval(double start,
double end)
addIntervalList
public void addIntervalList(IntervalList il)
removeIntervalList
public void removeIntervalList(IntervalList il)
restrictToInterval
public void restrictToInterval(double start,
double end)
restrictToInterval
public void restrictToInterval(IntervalList.Interval i)
restrictSubIntervalLength
public boolean restrictSubIntervalLength(double length)
iterator
public java.util.Iterator<IntervalList.Interval> iterator()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object