Class TimeInterval

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 Details

    • TimeInterval

      public TimeInterval​(Instant startTime, Instant endTime)
      Constructs a new time interval.
      Parameters:
      startTime - the start time of the interval
      endTime - the end time of the interval
  • Method Details

    • 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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals​(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object