Class FuelUse
java.lang.Object
org.deltava.beans.acars.FuelUse
A bean to track fuel usage and in-flight refueling on ACARS flights.
- Since:
- 3.7
- Version:
- 8.2
- Author:
- Luke
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Maximum delta between positions before trigerring in-flight refueling flag. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFuelUse
(int fuel) Adds an amount of fuel to the total fuel used.Returns any warning messages.boolean
Returns whether refueling occured in-flight.int
Returns the total amount of fuel used.void
setRefuel
(boolean inflightRefuel) Sets whether refueling occured in-flight.static FuelUse
validate
(Collection<? extends FuelChecker> positions) Calculates fuel use from flight data.
-
Field Details
-
MAX_DELTA
public static final int MAX_DELTAMaximum delta between positions before trigerring in-flight refueling flag.- See Also:
-
-
Constructor Details
-
FuelUse
public FuelUse()
-
-
Method Details
-
getRefuel
public boolean getRefuel()Returns whether refueling occured in-flight.- Returns:
- TRUE if refueling occured, otherwise FALSE
-
getTotalFuel
public int getTotalFuel()Returns the total amount of fuel used.- Returns:
- the amount of fuel in pounds
-
getMessages
Returns any warning messages.- Returns:
- a Collection of messages
-
addFuelUse
public void addFuelUse(int fuel) Adds an amount of fuel to the total fuel used.- Parameters:
fuel
- the amount of fuel in pounds
-
setRefuel
public void setRefuel(boolean inflightRefuel) Sets whether refueling occured in-flight.- Parameters:
inflightRefuel
- TRUE if refueling occured, otherwise FALSE
-
validate
Calculates fuel use from flight data.- Parameters:
positions
- a Collection of RouteEntry beans- Returns:
- a FuelUse bean
-