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
An interface to describe beans with a start and an end time.
- Since:
- 3.1
- Version:
- 12.4
- Author:
- Luke
-
Method Summary
Modifier and TypeMethodDescriptiondefault DurationThe 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 booleanhasTimes()Returns whether the start and end times are populated.default voidValidates that the start/end dates are present and is chronological order.Methods inherited from interface CalendarEntry
getDateMethods inherited from interface Comparable
compareTo
-
Method Details
-
getStartTime
-
getEndTime
-
validateDates
default void validateDates()Validates that the start/end dates are present and is chronological order.- Throws:
IllegalArgumentException- if the dates fail validation
-
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
-