edu.umd.cfar.lamp.viper.util
Class Intervals

java.lang.Object
  extended byedu.umd.cfar.lamp.viper.util.Intervals

public class Intervals
extends java.lang.Object

Utility methods for dealing with intervals, ranges and the like.


Constructor Summary
Intervals()
           
 
Method Summary
static java.util.Iterator complement(TemporalRange tr)
          Iterates through the complement intervals, that is, the intervals that are not in the range.
static IntervalIndexList singleton(Interval i)
          Gets an IntervalIndexList that refers to a single interval.
static TemporalRange singletonRange(InstantInterval i)
          Gets an Temporal that refers to a single interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Intervals

public Intervals()
Method Detail

singleton

public static IntervalIndexList singleton(Interval i)
Gets an IntervalIndexList that refers to a single interval.

Parameters:
i - the interval to contain
Returns:
an immutable list of intervals containing the specified interval

singletonRange

public static TemporalRange singletonRange(InstantInterval i)
Gets an Temporal that refers to a single interval.

Parameters:
i - the interval to contain
Returns:
an immutable range containing the specified interval

complement

public static java.util.Iterator complement(TemporalRange tr)
Iterates through the complement intervals, that is, the intervals that are not in the range.

Parameters:
tr -
Returns: