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:
804 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.preferences;
|
---|
3 |
|
---|
4 | import java.util.Collection;
|
---|
5 |
|
---|
6 | import org.openstreetmap.josm.Main;
|
---|
7 |
|
---|
8 | public class CollectionProperty {
|
---|
9 | private final String key;
|
---|
10 | private final Collection<String> defaultValue;
|
---|
11 |
|
---|
12 | public CollectionProperty(String key, Collection<String> defaultValue) {
|
---|
13 | this.key = key;
|
---|
14 | this.defaultValue = defaultValue;
|
---|
15 | }
|
---|
16 |
|
---|
17 | public Collection<String> get() {
|
---|
18 | return Main.pref.getCollection(getKey(), getDefaultValue());
|
---|
19 | }
|
---|
20 |
|
---|
21 | public boolean put(Collection<String> value) {
|
---|
22 | return Main.pref.putCollection(getKey(), value);
|
---|
23 | }
|
---|
24 |
|
---|
25 | public String getKey() {
|
---|
26 | return key;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public Collection<String> getDefaultValue() {
|
---|
30 | return defaultValue;
|
---|
31 | }
|
---|
32 |
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.