mapFlightClass static method
- String type
Implementation
static FlightClass mapFlightClass(String type) {
switch (type.toLowerCase()) {
case "firstclass":
return FlightClass.firstClass;
case "first":
return FlightClass.firstClass;
case "business":
return FlightClass.business;
case "premium_economy":
case "premiumeconomy":
return FlightClass.premiumEconomy;
case "economy":
return FlightClass.economy;
default:
return FlightClass.firstClass;
}
}