22
33import java .util .*;
44
5+ import static java .util .Arrays .asList ;
6+
57public class Dish {
68
79 private final String name ;
@@ -40,13 +42,27 @@ public String toString() {
4042 }
4143
4244 public static final List <Dish > menu =
43- Arrays .asList ( new Dish ("pork" , false , 800 , Dish .Type .MEAT ),
44- new Dish ("beef" , false , 700 , Dish .Type .MEAT ),
45- new Dish ("chicken" , false , 400 , Dish .Type .MEAT ),
46- new Dish ("french fries" , true , 530 , Dish .Type .OTHER ),
47- new Dish ("rice" , true , 350 , Dish .Type .OTHER ),
48- new Dish ("season fruit" , true , 120 , Dish .Type .OTHER ),
49- new Dish ("pizza" , true , 550 , Dish .Type .OTHER ),
50- new Dish ("prawns" , false , 400 , Dish .Type .FISH ),
51- new Dish ("salmon" , false , 450 , Dish .Type .FISH ));
45+ asList ( new Dish ("pork" , false , 800 , Dish .Type .MEAT ),
46+ new Dish ("beef" , false , 700 , Dish .Type .MEAT ),
47+ new Dish ("chicken" , false , 400 , Dish .Type .MEAT ),
48+ new Dish ("french fries" , true , 530 , Dish .Type .OTHER ),
49+ new Dish ("rice" , true , 350 , Dish .Type .OTHER ),
50+ new Dish ("season fruit" , true , 120 , Dish .Type .OTHER ),
51+ new Dish ("pizza" , true , 550 , Dish .Type .OTHER ),
52+ new Dish ("prawns" , false , 400 , Dish .Type .FISH ),
53+ new Dish ("salmon" , false , 450 , Dish .Type .FISH ));
54+
55+ public static final Map <String , List <String >> dishTags = new HashMap <>();
56+
57+ static {
58+ dishTags .put ("pork" , asList ("greasy" , "salty" ));
59+ dishTags .put ("beef" , asList ("salty" , "roasted" ));
60+ dishTags .put ("chicken" , asList ("fried" , "crisp" ));
61+ dishTags .put ("french fries" , asList ("greasy" , "fried" ));
62+ dishTags .put ("rice" , asList ("light" , "natural" ));
63+ dishTags .put ("season fruit" , asList ("fresh" , "natural" ));
64+ dishTags .put ("pizza" , asList ("tasty" , "salty" ));
65+ dishTags .put ("prawns" , asList ("tasty" , "roasted" ));
66+ dishTags .put ("salmon" , asList ("delicious" , "fresh" ));
67+ }
5268}
0 commit comments