public class TimeRange extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Timespec |
begin |
protected Timespec |
end |
static TimeRange |
UNIVERSE_RANGE
Timerange that spans the universal set of all representable time.
|
| Constructor and Description |
|---|
TimeRange(Timespec begin,
Timespec end) |
| Modifier and Type | Method and Description |
|---|---|
Timespec |
getBegin() |
Timespec |
getEnd() |
static TimeRange |
intersect(TimeRange lhs,
TimeRange rhs)
Returns the intersection of two time ranges, that is, the widest possible range that
is contained by both time ranges.
|
static TimeRange |
merge(TimeRange r,
Timespec t)
Merges a new timespec into this time range, and widens the time range if necessary
to be wide enough to contain this time point.
|
String |
toString() |
static TimeRange |
union(TimeRange lhs,
TimeRange rhs)
Returns the union of two time ranges, that is, the range that can contain both
time ranges.
|
TimeRange |
withBegin(Timespec b)
Returns a copy of this timerange with a different begin.
|
TimeRange |
withEnd(Timespec e)
Returns a copy of this timerange with a different end.
|
public static final TimeRange UNIVERSE_RANGE
protected Timespec begin
protected Timespec end
public Timespec getBegin()
public TimeRange withBegin(Timespec b)
public Timespec getEnd()
public static TimeRange union(TimeRange lhs, TimeRange rhs)
public static TimeRange intersect(TimeRange lhs, TimeRange rhs)
Copyright © 2022. All rights reserved.