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 TypeMethodDescriptionvoid
add
(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:IngredientSource
Return the available ingredients.- Specified by:
getIngredients
in interfaceIngredientSource
-
getIngredient
Description copied from interface:IngredientSource
Return the ingredient with the specified id.- Specified by:
getIngredient
in interfaceIngredientSource
- Parameters:
id
- the ingredient to return
-
getSourceId
Description copied from interface:IngredientSource
Return the unique id of the source.- Specified by:
getSourceId
in interfaceIngredientSource
-