public class TimeInterval extends Object
Modifier and Type | Method and Description |
---|---|
static TimeInterval |
between(Timestamp start,
Timestamp end)
Returns the interval between the given timestamps.
|
boolean |
contains(Timestamp instant)
True if the given time stamp is inside the interval.
|
boolean |
equals(Object obj) |
Timestamp |
getEnd()
Final value of the interval.
|
Timestamp |
getStart()
Initial value of the interval.
|
int |
hashCode() |
TimeInterval |
minus(TimeDuration duration)
Returns a new interval shifted backward in time by the given duration.
|
String |
toString() |
public boolean contains(Timestamp instant)
instant
- a time stamppublic static TimeInterval between(Timestamp start, Timestamp end)
start
- the beginning of the intervalend
- the end of the intervalpublic TimeInterval minus(TimeDuration duration)
duration
- a time durationpublic Timestamp getStart()
public Timestamp getEnd()
Copyright © 2015. All rights reserved.