Add non-String overloades for CordovaPreferences.set()

This commit is contained in:
Andrew Grieve 2014-07-10 10:23:26 -04:00
parent 2f24e42dc1
commit 1c5b5e2ce6

View File

@ -40,6 +40,18 @@ public class CordovaPreferences {
prefs.put(name.toLowerCase(Locale.ENGLISH), value);
}
public void set(String name, boolean value) {
set(name, "" + value);
}
public void set(String name, int value) {
set(name, "" + value);
}
public void set(String name, double value) {
set(name, "" + value);
}
public Map<String, String> getAll() {
return prefs;
}