title: Combinatorial puzzler
body: <p>I'm wondering what the best way of solving the following problem is:</p>
  
  <p>I have at the moment a <code>Map&lt;String, Collection&lt;String&gt;&gt;</code>. Let's say its a map of meals with a collection of beverages you could serve at that meal. E.g.</p>
  
  <p>Breakfast - Orange Juice
  Breakfast - Coffee</p>
  
  <p>Lunch - Orange Juice
  Lunch - Soda
  Lunch - Beer</p>
  
  <p>Dinner - Soda
  Dinner - Beer
  Dinner - Wine</p>
  
  <p>So my collection really is <code>Map&lt;Meal, Collection&lt;Beverage&gt;&gt;</code></p>
  
  <p>What I need to do is create a <code>List&lt;Map&lt;String,String&gt;&gt;</code> of all the various combinations of beverages over the meals. I will have in this case 18 combinations. E.g.</p>
  
  <p>[</p>
  
  <p>[
  Breakfast -> Orange Juice,
  Lunch -> Orange Juice,
  Dinner -> Soda
  ]</p>
  
  <p>[
  Breakfast -> Orange Juice,
  Lunch -> Orange Juice,
  Dinner -> Beer
  ]</p>
  
  <p>[
  Breakfast -> Orange Juice,
  Lunch -> Orange Juice,
  Dinner -> Wine
  ]</p>
  
  <p>[
  Breakfast -> Orange Juice,
  Lunch -> Soda,
  Dinner -> Soda,
  ]</p>
  
  <p>etc...
  ]</p>
  
  <p>I'm interested in seeing how others would go about creating the final collection.</p>
  
  <p>Also, I'm using java, so nifty functional stuff is off limits.</p>
  
  <p>Thanks</p>
  
  <h1>EDIT</h1>
  
  <p>Meal types are dynamic. That is, dinner could be removed from the list or brunch added.</p>