// License: GPL. For details, see LICENSE file. package org.openstreetmap.josm.data.preferences; import java.util.ArrayList; import java.util.Collection; /** * A property containing a {@code Collection} of {@code String} as value. * @deprecated use {@link ListProperty} */ @Deprecated public class CollectionProperty extends AbstractProperty> { /** * Constructs a new {@code CollectionProperty}. * @param key The property key * @param defaultValue The default value */ public CollectionProperty(String key, Collection defaultValue) { super(key, defaultValue); if (getPreferences() != null) { get(); } } @Override public Collection get() { return getPreferences().getList(getKey(), new ArrayList<>(getDefaultValue())); } @Override public boolean put(Collection value) { return getPreferences().putList(getKey(), new ArrayList<>(value)); } }