Class SimpleIngredientSource
java.lang.Object
com.tccc.kos.ext.dispense.service.ingredient.SimpleIngredientSource
- All Implemented Interfaces:
IngredientSource
Simple ingredient source backed by a map that is useful for testing.
- Since:
- 1.0
- Version:
- 2023-02-01
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(BaseIngredient ingredient) Add an ingredient to the source.getIngredient(String id) Return the ingredient with the specified id.Return the available ingredients.Return the unique id of the source.
-
Constructor Details
-
SimpleIngredientSource
-
-
Method Details
-
add
Add an ingredient to the source.- Parameters:
ingredient- the ingredient to add
-
getIngredients
Description copied from interface:IngredientSourceReturn the available ingredients.- Specified by:
getIngredientsin interfaceIngredientSource
-
getIngredient
Description copied from interface:IngredientSourceReturn the ingredient with the specified id.- Specified by:
getIngredientin interfaceIngredientSource- Parameters:
id- the ingredient to return
-
getSourceId
Description copied from interface:IngredientSourceReturn the unique id of the source.- Specified by:
getSourceIdin interfaceIngredientSource
-