tim@335: package de.intevation.gnv.state.describedata; tim@335: tim@335: /** ingo@809: * This is the default implementation of KeyValueDescibeData. This ingo@809: * class just implements the necessary methods and two constructors. sascha@835: * sascha@780: * @author Tim Englich tim@335: */ tim@335: public class DefaultKeyValueDescribeData implements KeyValueDescibeData { tim@335: tim@335: private static final long serialVersionUID = -924469415242703108L; tim@335: tim@335: private String key; tim@335: tim@335: private String value = null; tim@335: ingo@473: private String state; ingo@473: tim@335: private boolean selected = false; tim@335: ingo@809: /** ingo@809: * Creates a new instance of this class with a key-value pair, but no state ingo@809: * and no selection. ingo@809: * ingo@809: * @param key The key. ingo@809: * @param value A value. ingo@809: */ tim@335: public DefaultKeyValueDescribeData(String key, String value) { ingo@473: this(key, value, null); ingo@473: } ingo@473: ingo@809: /** ingo@809: * Creates a new instance of this class with a key-value pair and the state ingo@809: * this object belongs to. ingo@809: * ingo@809: * @param key The key. ingo@809: * @param value A value. ingo@809: * @param state A state. ingo@809: */ ingo@473: public DefaultKeyValueDescribeData(String key, String value, String state) { tim@335: super(); tim@335: this.key = key; tim@335: this.value = value; ingo@473: this.state = state; tim@335: } tim@335: tim@335: public String getKey() { tim@335: return this.key; tim@335: } tim@335: tim@335: public String getValue() { tim@335: return this.value; tim@335: } tim@335: tim@335: public boolean isSelected() { tim@335: return this.selected; tim@335: } tim@335: tim@335: public void setSelected(boolean selected) { tim@335: this.selected = selected; tim@335: } tim@335: ingo@473: public String getState() { ingo@473: return this.state; ingo@473: } tim@335: } ingo@809: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :