Preferences
class, allowing to use these preferences in a network. These preferences have the following properties:Preferences
, not supported directly in the default Java implementation:Map
of values for a preference:Map<String, Object> map = PreferencesHelper.getMap(pref, "enabled", Boolean.class, false);It is possible to get a Map with values of a particular class type by using the PreferencesHelper.getMapForClass(Preferences, String, Class, Object) method:
Map<String, Boolean> map = PreferencesHelper.getMapForClass(pref, "enabled", Boolean.class, false);
Map
of values for a preference.Map<String, Object> map = ... PreferencesHelper.putMap(pref, "enabled", map);It is possible to put a Map with values of a particular class type by using the PreferencesHelper.putMapForClass(Preferences, String, Map) method:
Map<String, Boolean> map = ... PreferencesHelper.putMapForClass(pref, "enabled", map);
Copyright 2006-2024 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences