|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deltava.beans.schedule.Aircraft
public class Aircraft
A bean to store Aircraft type information and ACARS fuel profiles. Fuel is loaded in ACARS in the order of primary, secondary and other tanks, and each Microsoft Flight Simulator fuel tank can be assigned to one of these three tank types.
| Field Summary | |
|---|---|
static int |
CENTER
|
static int |
CENTER2
|
static int |
CENTER3
|
static int |
EXT1
|
static int |
EXT2
|
static int |
LEFT_AUX
|
static int |
LEFT_MAIN
|
static int |
LEFT_TIP
|
static int |
OTHER
|
static int |
PRIMARY
|
static int |
RIGHT_AUX
|
static int |
RIGHT_MAIN
|
static int |
RIGHT_TIP
|
static int |
SECONDARY
|
static String[] |
TANK_NAMES
|
static String[] |
TANK_TYPES
|
| Constructor Summary | |
|---|---|
Aircraft(String name)
Initializes the bean. |
|
| Method Summary | |
|---|---|
void |
addApp(AirlineInformation ai)
Marks this aircraft type as used by a particular web application. |
void |
addIATA(String code)
Links an IATA equipment code to this aircraft. |
Object |
cacheKey()
Returns the aircrat name. |
void |
clearApps()
Clears the web applications used with this aircraft type. |
int |
compareTo(Aircraft a2)
Compares two aircraft by comparing their names. |
boolean |
equals(Object o)
|
Collection<AirlineInformation> |
getApps()
Returns all web applications using this aircraft type. |
int |
getBaseFuel()
Returns the aircraft's base fuel load. |
int |
getCruiseSpeed()
Returns the aircraft's cruise speed |
byte |
getEngines()
Returns the number of engines on this aircraft. |
String |
getEngineType()
Returns the aircraft's engine type. |
boolean |
getETOPS()
Returns whether the aircraft is ETOPS-qualified. |
int |
getFuelFlow()
Returns the aircraft's fuel flow. |
String |
getFullName()
Returns the aircraft's full name. |
boolean |
getHistoric()
Returns whether this aircraft is a Historic type. |
Collection<String> |
getIATA()
Returns the aircraft's IATA equipment code(s). |
int |
getMaxLandingWeight()
Returns the maximum landing weight of the Aircraft. |
int |
getMaxTakeoffWeight()
Returns the maximum takeoff weight of the Aircraft. |
int |
getMaxWeight()
Returns the maximum weight of the Aircraft. |
String |
getName()
Returns the aircraft name. |
int |
getPct(int tankType)
Returns the filling percentage for a particular tank type. |
int |
getRange()
Returns the maximum range of the aircraft. |
String |
getRowClassName()
Returns the CSS class name to use if displaying in a view table. |
Map<String,Collection<String>> |
getTankNames()
Returns the fuel tank names, for display in a JSP. |
Map<String,Integer> |
getTankPercent()
Returns the fuel tank fill percentages, for display in a JSP. |
int |
getTanks(int tankType)
Returns the fuel tank codes for a particular tank type. |
int |
getTaxiFuel()
Returns the aircraft's taxi fuel load. |
int |
hashCode()
Returns the aircraft name hash code. |
boolean |
isUsed(String code)
Returns whether a particular web application uses this aircraft type. |
void |
setBaseFuel(int fuelAmt)
Updates the aircraft's base fuel load. |
void |
setCruiseSpeed(int speed)
Updates the aircraft's cruise speed. |
void |
setEngines(byte engines)
Updates the number of engines on this aircraft. |
void |
setEngineType(String engName)
Updates the aircraft's engine type. |
void |
setETOPS(boolean isETOPS)
Updates whether this aircraft is ETOPS-rated. |
void |
setFuelFlow(int flow)
Updates the aircraft's cruise fuel flow. |
void |
setFullName(String name)
Updates the aircraft's full name. |
void |
setHistoric(boolean isHistoric)
Updates whether this aircraft is a Historic type. |
void |
setIATA(Collection<String> codes)
Updates this aircraft's IATA codes. |
void |
setMaxLandingWeight(int weight)
Updates the maximum landing weight of the Aircraft. |
void |
setMaxTakeoffWeight(int weight)
Updates the maximum takeoff weight of the Aircraft. |
void |
setMaxWeight(int weight)
Updates the maximum weight of the Aircraft. |
void |
setName(String name)
Updates the aircraft name. |
void |
setPct(int tankType,
int pct)
Updates the tank usage percentage for a particular fuel tank type. |
void |
setRange(int range)
Updates the maximum range of the aircraft. |
void |
setTanks(int tankType,
Collection<String> tankNames)
Updates the fuel tanks used in filling the aircraft. |
void |
setTanks(int tankType,
int tankCodes)
Updates the fuel tanks used in filling the aircraft. |
void |
setTaxiFuel(int fuelAmt)
Updates the aircraft's taxi fuel load. |
String |
toString()
Returns the aircraft name. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CENTER
public static final int LEFT_MAIN
public static final int LEFT_AUX
public static final int LEFT_TIP
public static final int RIGHT_MAIN
public static final int RIGHT_AUX
public static final int RIGHT_TIP
public static final int CENTER2
public static final int CENTER3
public static final int EXT1
public static final int EXT2
public static final String[] TANK_TYPES
public static final String[] TANK_NAMES
public static final int PRIMARY
public static final int SECONDARY
public static final int OTHER
| Constructor Detail |
|---|
public Aircraft(String name)
name - the equipment name
NullPointerException - if name is null| Method Detail |
|---|
public String getName()
setName(String)public int getRange()
setRange(int)public Collection<String> getIATA()
addIATA(String),
setIATA(Collection)public boolean getHistoric()
setHistoric(boolean)public boolean getETOPS()
setETOPS(boolean)public String getFullName()
setFullName(String)public byte getEngines()
setEngines(byte)public String getEngineType()
setEngineType(String)public int getCruiseSpeed()
setCruiseSpeed(int)public int getBaseFuel()
setBaseFuel(int)public int getTaxiFuel()
setTaxiFuel(int)public int getFuelFlow()
setFuelFlow(int)public Collection<AirlineInformation> getApps()
isUsed(String),
addApp(AirlineInformation),
AirlineInformationpublic boolean isUsed(String code)
code - the web application airline code
getApps(),
addApp(AirlineInformation)public int getTanks(int tankType)
tankType - the fuel tank type
IllegalArgumentException - if tankType is invalidgetTankNames(),
setTanks(int, int)public int getPct(int tankType)
tankType - the fuel tank type
IllegalArgumentException - if tankType is invalidsetPct(int, int)public Map<String,Collection<String>> getTankNames()
getTankPercent(),
TANK_TYPES,
TANK_NAMESpublic Map<String,Integer> getTankPercent()
getTankNames(),
TANK_TYPES,
TANK_NAMESpublic int getMaxWeight()
setMaxWeight(int)public int getMaxTakeoffWeight()
setMaxTakeoffWeight(int)public int getMaxLandingWeight()
setMaxLandingWeight(int)public void addApp(AirlineInformation ai)
ai - the AirlineInformation beanisUsed(String),
getApps(),
AirlineInformationpublic void clearApps()
public void setName(String name)
name - the name
NullPointerException - if name is nullgetName()public void setFullName(String name)
name - the full name
NullPointerException - if name is nullgetFullName()public void setRange(int range)
range - the range in milesgetRange()public void setHistoric(boolean isHistoric)
isHistoric - TRUE if a Historic type, otherwise FALSEgetHistoric()public void setETOPS(boolean isETOPS)
isETOPS - TRUE if ETOPS-rated, otherwise FALSEpublic void setMaxWeight(int weight)
weight - the weight in poundsgetMaxWeight()public void setMaxTakeoffWeight(int weight)
weight - the weight in poundsgetMaxTakeoffWeight()public void setMaxLandingWeight(int weight)
weight - the weight in poundssetMaxLandingWeight(int)public void addIATA(String code)
code - the equipment code
NullPointerException - if code is nullgetIATA(),
setIATA(Collection)public void setIATA(Collection<String> codes)
codes - a Collection of codesaddIATA(String),
getIATA()public void setEngines(byte engines)
engines - the number of engnes
IllegalArgumentException - if engines is zero, negative or > 8getEngines()public void setEngineType(String engName)
engName - the engine typegetEngineType()public void setCruiseSpeed(int speed)
speed - the speed in knotsgetCruiseSpeed()public void setBaseFuel(int fuelAmt)
fuelAmt - the amount of fuel in poundsgetBaseFuel()public void setTaxiFuel(int fuelAmt)
fuelAmt - the amount of fuel in poundsgetTaxiFuel()public void setFuelFlow(int flow)
flow - the fuel flow in pounds per engine per hourgetFuelFlow()
public void setPct(int tankType,
int pct)
tankType - the tank typepct - the percentage required to be filled before filling the next tank type
IllegalArgumentException - if tankType is invalidgetPct(int)
public void setTanks(int tankType,
int tankCodes)
tankType - the tank typetankCodes - the codes for the fuel tanks used in this order
IllegalArgumentException - if tankType is invalidsetTanks(int, Collection),
getTanks(int),
getTankNames()
public void setTanks(int tankType,
Collection<String> tankNames)
tankType - the tank typetankNames - a Collection of tank names
IllegalArgumentException - if tankType is invalidsetTanks(int, int),
getTanks(int),
getTankNames()public int compareTo(Aircraft a2)
compareTo in interface Comparable<Aircraft>public boolean equals(Object o)
equals in class Objectpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic Object cacheKey()
cacheKey in interface Cacheablepublic String getRowClassName()
getRowClassName in interface ViewEntry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||