public class TimeRange extends Object implements Comparable<TimeRange>
Modifier and Type | Field and Description |
---|---|
double |
end
The end of the time range
|
double |
start
The start of the time range
|
Constructor and Description |
---|
TimeRange(double start,
double end)
Create a time range.
|
public double start
public double end
public TimeRange(double start, double end)
start
- the start of the time rangeend
- the end of the time rangepublic double length()
public boolean contains(double time)
time
- the time to checkpublic int compareTo(TimeRange t)
compareTo
in interface Comparable<TimeRange>
d
- the time range to compare with