001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.preferences; 003 004/** 005 * A property containing an {@code String} value. 006 */ 007public class StringProperty extends AbstractToStringProperty<String> { 008 009 /** 010 * Constructs a new {@code StringProperty}. 011 * @param key The property key 012 * @param defaultValue The default value 013 */ 014 public StringProperty(String key, String defaultValue) { 015 super(key, defaultValue); 016 } 017 018 @Override 019 public String get() { 020 // Removing this implementation breaks binary compatibility 021 return super.get(); 022 } 023 024 @Override 025 public boolean put(String value) { 026 // Removing this implementation breaks binary compatibility 027 return super.put(value); 028 } 029 030 @Override 031 protected String fromString(String string) { 032 return string; 033 } 034 035 @Override 036 protected String toString(String string) { 037 return string; 038 } 039}