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 booleanequals(Object obj)DurationgetDuration()Returns the duration of the interval.InstantgetEndTime()Returns the end time of the interval.InstantgetStartTime()Returns the start time of the interval.inthashCode()StringtoString()
-
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
-