Class TourFlightHelper
java.lang.Object
org.deltava.beans.flight.TourFlightHelper
A helper class to calculate Flight Tour eligibility.
- Since:
- 10.0
- Version:
- 11.2
- Author:
- Luke
-
Constructor Summary
ConstructorsConstructorDescriptionTourFlightHelper(FlightData fr, boolean allowSubmitted) Initializes the Helper. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFlights(Collection<FlightReport> flights) Adds previous flights to the Helper.Returns the eligibility messages.booleanReturns if there is an eligibility message.booleanisComplete(Tour t) Returns whether a given Flight Tour has been completed.intDetermines whether the Flight is a valid Flight Tour leg.
-
Constructor Details
-
TourFlightHelper
Initializes the Helper.- Parameters:
fr- the FlightData to calculate eligibility forallowSubmitted- TRUE to allow submitted previous flights to count for eligibility, otherwise FALSE
-
-
Method Details
-
getMessages
Returns the eligibility messages.- Returns:
- a Collection of messages
-
hasMessage
public boolean hasMessage()Returns if there is an eligibility message.- Returns:
- TRUE if there is at least one message, otherwise FALSE
-
addFlights
Adds previous flights to the Helper.- Parameters:
flights- a Collection of FlightReport beans
-
isComplete
Returns whether a given Flight Tour has been completed.- Parameters:
t- the Tour- Returns:
- TRUE if completed, otherwise FALSE
-
isLeg
Determines whether the Flight is a valid Flight Tour leg.- Parameters:
t- the Tour to check- Returns:
- the leg index within the Tour, or zero if not found
-