@@ -14,10 +14,6 @@ public class DataPackage implements Serializable {
14
14
@ SerializedName ("games" )
15
15
HashMap <String , Game > games = new HashMap <>();
16
16
17
- HashMap <Long , String > itemIdToName = new HashMap <>();
18
-
19
- HashMap <Long , String > locationIdToName = new HashMap <>();
20
-
21
17
public String uuid = UUID .randomUUID ().toString ();
22
18
23
19
public String getItem (long itemID , String game ) {
@@ -50,48 +46,8 @@ public HashMap<String, Game> getGames() {
50
46
return games ;
51
47
}
52
48
53
- public HashMap <Long , String > getItems () {
54
- if (itemIdToName .isEmpty ()) {
55
- for (Map .Entry <String , Game > gameEntry : games .entrySet ()) {
56
- for (Map .Entry <String , Long > items : gameEntry .getValue ().itemNameToId .entrySet ()) {
57
- itemIdToName .put (items .getValue (), items .getKey ());
58
- }
59
- }
60
- }
61
- return itemIdToName ;
62
- }
63
-
64
- public HashMap <Long , String > getItemsForGame (String game ) {
65
- HashMap <Long , String > ret = new HashMap <>();
66
- for (Map .Entry <String , Game > gameEntry : games .entrySet ()) {
67
- if (!gameEntry .getKey ().equals (game )) continue ;
68
- for (Map .Entry <String , Long > items : gameEntry .getValue ().itemNameToId .entrySet ()) {
69
- ret .put (items .getValue (), items .getKey ());
70
- }
71
- }
72
- return ret ;
73
- }
74
-
75
- public HashMap <Long , String > getLocations () {
76
- if (locationIdToName .isEmpty ()) {
77
- for (Map .Entry <String , Game > gameEntry : games .entrySet ()) {
78
- for (Map .Entry <String , Long > locations : gameEntry .getValue ().locationNameToId .entrySet ()) {
79
- itemIdToName .put (locations .getValue (), locations .getKey ());
80
- }
81
- }
82
- }
83
- return itemIdToName ;
84
- }
85
-
86
- public HashMap <Long , String > getLocationsForGame (String game ) {
87
- HashMap <Long , String > ret = new HashMap <>();
88
- for (Map .Entry <String , Game > gameEntry : games .entrySet ()) {
89
- if (!gameEntry .getKey ().equals (game )) continue ;
90
- for (Map .Entry <String , Long > locations : gameEntry .getValue ().locationNameToId .entrySet ()) {
91
- ret .put (locations .getValue (), locations .getKey ());
92
- }
93
- }
94
- return ret ;
49
+ public Game getGame (String game ) {
50
+ return games .get (game );
95
51
}
96
52
97
53
0 commit comments