Package cielsachen.mco1.service
Class CoffeeService
java.lang.Object
cielsachen.mco1.service.CoffeeService
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Americano
final Cappuccino
final Product
final Latte
final Product
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSyrup
(Truck truck, Ingredient syrup, int amount) brewCoffee
(Truck truck, Coffee coffee, CoffeeSize size, EspressoRatio ratio) brewEspressoShots
(Truck truck, double amount, EspressoRatio ratio) boolean
canAddSyrup
(Truck truck, Ingredient syrup, int amount) boolean
canBrewCoffee
(Truck truck, Coffee coffee, CoffeeSize size, EspressoRatio ratio) boolean
canBrewEspressoShots
(Truck truck, double amount, EspressoRatio ratio) Coffee[]
getCoffeesByTruck
(Truck truck) boolean
isCapableOfBrewing
(Truck truck) boolean
isCapableOfBrewing
(Truck truck, Coffee coffee) boolean
-
Field Details
-
americano
-
cappuccino
-
latte
-
espresso
-
syrup
-
-
Constructor Details
-
CoffeeService
-
-
Method Details
-
addSyrup
-
brewCoffee
public Map<Ingredient,Double> brewCoffee(Truck truck, Coffee coffee, CoffeeSize size, EspressoRatio ratio) -
brewEspressoShots
-
canAddSyrup
public boolean canAddSyrup(Truck truck, Ingredient syrup, int amount) throws InsufficientCapacityException - Throws:
InsufficientCapacityException
-
canBrewCoffee
public boolean canBrewCoffee(Truck truck, Coffee coffee, CoffeeSize size, EspressoRatio ratio) throws InsufficientCapacityException - Throws:
InsufficientCapacityException
-
canBrewEspressoShots
public boolean canBrewEspressoShots(Truck truck, double amount, EspressoRatio ratio) throws InsufficientCapacityException - Throws:
InsufficientCapacityException
-
getCoffees
-
getCoffeesByTruck
-
isCapableOfBrewing
-
isCapableOfBrewing
-
isPricesSet
public boolean isPricesSet()
-