mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
Allowed GenericTypes in addJsonObject method
This commit is contained in:
parent
037fb131ec
commit
4244bdbe3c
@ -95,10 +95,10 @@ public class PlayerDataTableUpdater {
|
||||
addData(key, json.toString());
|
||||
}
|
||||
|
||||
public void addJSONObject(String key, Set<Map.Entry<String, Integer>> collection) {
|
||||
public <T,V> void addJSONObject(String key, Set<Map.Entry<T, V>> collection) {
|
||||
JsonObject json = new JsonObject();
|
||||
for (Map.Entry<String, Integer> entry : collection)
|
||||
json.addProperty(entry.getKey(), entry.getValue());
|
||||
for (Map.Entry<T, V> entry : collection)
|
||||
json.addProperty(entry.getKey().toString(), entry.getValue().toString());
|
||||
addData(key, json.toString());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user