Let's say I have to implement the menu of a restaurant and I have different dish names with their respective ingredients.
For example:
Classic: strawberry, banana, pineapple, mango, peach, honey, ice, yogurt
Forest Berry: strawberry, raspberry, blueberry, honey, ice, yogurt
...
In python, I would use a dictionary to implement such things. Later on, with this data structure, I would need to write a method that given a string containing first the name of the dish (the key, if I use a dictionary) and an optional list of ingredients separated by commas, returns the ingredients of the dish minus the ones (if) included in the string.
For example, let's run the method ingredients with the following configuration:
Smoothie.ingredients("Classic,-strawberry,-banana")
The out I would need would be:
"honey,ice,mango,peach,pineapple,yogurt"
I am looking to the most convenient Java data structure to store this kind of object and perform this kind of operation.