source: josm/trunk/src/org/openstreetmap/josm/data/preferences/ParametrizedCollectionProperty.java@ 3730

Last change on this file since 3730 was 3720, checked in by bastiK, 13 years ago

added missing svn:eol-style

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/plain
File size: 728 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.preferences;
3
4import java.util.Collection;
5
6import org.openstreetmap.josm.Main;
7
8public abstract class ParametrizedCollectionProperty {
9
10 private final Collection<String> defaultValue;
11
12 public ParametrizedCollectionProperty(Collection<String> defaultValue) {
13 this.defaultValue = defaultValue;
14 }
15
16 protected abstract String getKey(String... params);
17
18 public Collection<String> get(String... params) {
19 return Main.pref.getCollection(getKey(params), defaultValue);
20 }
21
22 public boolean put(Collection<String> value, String... params) {
23 return Main.pref.putCollection(getKey(params), value);
24 }
25
26}
Note: See TracBrowser for help on using the repository browser.