Interface TimeSpan

All Superinterfaces:
CalendarEntry, Comparable<Object>
All Known Implementing Classes:
AbstractCalendarCommand.CalendarContext, ACARSFlightReport, ConnectionEntry, DispatchConnectionEntry, DispatchScheduleEntry, Event, FDRFlightReport, FlightInfo, InstructionBusy, InstructionSession, NetworkOutage, SimFDRFlightReport, Tour, XACARSFlightReport, XAFlightInfo

public interface TimeSpan extends CalendarEntry
An interface to describe beans with a start and an end time.
Since:
3.1
Version:
12.4
Author:
Luke
  • Method Summary

    Modifier and Type
    Method
    Description
    default Duration
    The duration of this span, or null if both times are not set.
    The end date/time of this span.
    The start date/time of this span.
    default boolean
    Returns whether the start and end times are populated.
    default void
    Validates that the start/end dates are present and is chronological order.

    Methods inherited from interface CalendarEntry

    getDate
    Modifier and Type
    Method
    Description
    Returns this entry's date for ordering in the Calendar.

    Methods inherited from interface Comparable

    compareTo
  • Method Details

    • getStartTime

      Instant getStartTime()
      The start date/time of this span.
      Returns:
      the start date/time
    • getEndTime

      Instant getEndTime()
      The end date/time of this span.
      Returns:
      the end date/time
    • validateDates

      default void validateDates()
      Validates that the start/end dates are present and is chronological order.
      Throws:
      IllegalArgumentException - if the dates fail validation
    • getDuration

      default Duration getDuration()
      The duration of this span, or null if both times are not set.
      Returns:
      a Duration, or null
    • hasTimes

      default boolean hasTimes()
      Returns whether the start and end times are populated.
      Returns:
      TRUE if both are populated, otherwise FALSE