Last change
on this file since 13001 was 10824, checked in by Don-vip, 8 years ago |
see #13309 - Caching and notifying preferences (patch by michael2402) - gsoc-core
|
-
Property svn:eol-style
set to
native
|
File size:
963 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.preferences;
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * A property containing an {@code String} value.
|
---|
6 | */
|
---|
7 | public class StringProperty extends AbstractToStringProperty<String> {
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Constructs a new {@code StringProperty}.
|
---|
11 | * @param key The property key
|
---|
12 | * @param defaultValue The default value
|
---|
13 | */
|
---|
14 | public StringProperty(String key, String defaultValue) {
|
---|
15 | super(key, defaultValue);
|
---|
16 | }
|
---|
17 |
|
---|
18 | @Override
|
---|
19 | public String get() {
|
---|
20 | // Removing this implementation breaks binary compatibility
|
---|
21 | return super.get();
|
---|
22 | }
|
---|
23 |
|
---|
24 | @Override
|
---|
25 | public boolean put(String value) {
|
---|
26 | // Removing this implementation breaks binary compatibility
|
---|
27 | return super.put(value);
|
---|
28 | }
|
---|
29 |
|
---|
30 | @Override
|
---|
31 | protected String fromString(String string) {
|
---|
32 | return string;
|
---|
33 | }
|
---|
34 |
|
---|
35 | @Override
|
---|
36 | protected String toString(String string) {
|
---|
37 | return string;
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.