mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-30 01:13:38 +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());
|
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();
|
JsonObject json = new JsonObject();
|
||||||
for (Map.Entry<String, Integer> entry : collection)
|
for (Map.Entry<T, V> entry : collection)
|
||||||
json.addProperty(entry.getKey(), entry.getValue());
|
json.addProperty(entry.getKey().toString(), entry.getValue().toString());
|
||||||
addData(key, json.toString());
|
addData(key, json.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user