orc.lib.state
Class Intervals<T extends java.lang.Comparable>
java.lang.Object
orc.lib.state.Intervals<T>
- All Implemented Interfaces:
- java.lang.Iterable<Interval<T>>
public final class Intervals<T extends java.lang.Comparable>
- extends java.lang.Object
- implements java.lang.Iterable<Interval<T>>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Intervals
public Intervals()
Intervals
public Intervals(Interval<T> range)
union
public Intervals<T> union(Interval<T> interval)
- This is most efficient when the interval goes at the front of the set.
intersect
public Intervals<T> intersect(Intervals<T> that)
spans
public boolean spans(T point)
isEmpty
public boolean isEmpty()
iterator
public java.util.Iterator<Interval<T>> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<Interval<T extends java.lang.Comparable>>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object