Changeset 14122 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-08-11T18:18:58+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r14119 r14122 693 693 } 694 694 695 /** 696 * Gets a map of all settings that are currently stored 697 * @return The settings 698 */ 695 @Override 699 696 public Map<String, Setting<?>> getAllSettings() { 700 697 return new TreeMap<>(settingsMap); -
trunk/src/org/openstreetmap/josm/spi/preferences/AbstractPreferences.java
r12881 r14122 124 124 125 125 /** 126 * Gets a map of all settings that are currently stored 127 * @return The settings 128 */ 129 public abstract Map<String, Setting<?>> getAllSettings(); 130 131 /** 126 132 * Set a value for a certain setting. The changed setting is saved to the preference file immediately. 127 133 * Due to caching mechanisms on modern operating systems and hardware, this shouldn't be a performance problem. -
trunk/src/org/openstreetmap/josm/spi/preferences/MemoryPreferences.java
r12987 r14122 7 7 import java.util.Objects; 8 8 import java.util.Set; 9 import java.util.TreeMap; 9 10 10 11 /** … … 22 23 @Override 23 24 public boolean putSetting(String key, Setting<?> setting) { 24 Setting current = settings.get(key);25 Setting<?> current = settings.get(key); 25 26 if (setting == null) { 26 27 settings.remove(key); … … 33 34 @Override 34 35 public <T extends Setting<?>> T getSetting(String key, T def, Class<T> klass) { 35 Setting current = settings.get(key);36 Setting<?> current = settings.get(key); 36 37 if (current != null && klass.isInstance(current)) { 37 38 @SuppressWarnings("unchecked") … … 45 46 public Set<String> getKeySet() { 46 47 return Collections.unmodifiableSet(settings.keySet()); 48 } 49 50 @Override 51 public Map<String, Setting<?>> getAllSettings() { 52 return new TreeMap<>(settings); 47 53 } 48 54 … … 66 72 // do nothing 67 73 } 68 69 74 }
Note:
See TracChangeset
for help on using the changeset viewer.