- java.lang.Object
-
- com.flexganttfx.model.util.TimeInterval
-
public final class TimeInterval extends Object
A convenience class for storing a pair of instants that define a time interval.
-
-
Constructor Summary
Constructors Constructor Description TimeInterval(Instant startTime, Instant endTime)
Constructs a new time interval.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Duration
getDuration()
Returns the duration of the interval.Instant
getEndTime()
Returns the end time of the interval.Instant
getStartTime()
Returns the start time of the interval.int
hashCode()
String
toString()
-
-
-
Method Detail
-
getStartTime
public Instant getStartTime()
Returns the start time of the interval.- Returns:
- the start time
-
getEndTime
public Instant getEndTime()
Returns the end time of the interval.- Returns:
- the end time
-
getDuration
public Duration getDuration()
Returns the duration of the interval.- Returns:
- the duration
-
-