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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TimeRange t)
Compare time ranges.
|
boolean |
contains(double time)
See if the time is within the time range.
|
double |
length()
The length of the 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