source: josm/trunk/src/org/openstreetmap/josm/data/preferences/StringProperty.java@ 3715

Last change on this file since 3715 was 3451, checked in by jttt, 14 years ago

Memory leaks, minor changes needed by wmsplugin

  • Property svn:mime-type set to text/plain
File size: 687 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.preferences;
3
4import org.openstreetmap.josm.Main;
5
6public class StringProperty {
7
8 private final String key;
9 private final String defaultValue;
10
11 public StringProperty(String key, String defaultValue) {
12 this.key = key;
13 this.defaultValue = defaultValue;
14 }
15
16 public String get() {
17 return Main.pref.get(getKey(), getDefaultValue());
18 }
19
20 public boolean put(String value) {
21 return Main.pref.put(getKey(), value);
22 }
23
24 public String getKey() {
25 return key;
26 }
27
28 public String getDefaultValue() {
29 return defaultValue;
30 }
31
32}
Note: See TracBrowser for help on using the repository browser.