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
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()
-
Constructor Details
-
TimeInterval
Constructs a new time interval.- Parameters:
startTime
- the start time of the intervalendTime
- the end time of the interval
-
-
Method Details
-
getStartTime
Returns the start time of the interval.- Returns:
- the start time
-
getEndTime
Returns the end time of the interval.- Returns:
- the end time
-
getDuration
Returns the duration of the interval.- Returns:
- the duration
-
hashCode
public int hashCode() -
equals
-
toString
-