public class TimeRange extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Timespec |
begin |
protected Timespec |
end |
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 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 © 2021. All rights reserved.