java: isac.util.tactics .. end renamed, formatted, inst_var_, import cleaned
2 * Created on Feb 22, 2005
4 * @author Alan Krempler
7 package isac.util.usersettings;
9 import java.io.Serializable;
10 import java.util.HashMap;
13 * Class for storing/retrieving user settings, i.e. settings which can be set
14 * manually by the user as opposed to the
15 * {@link isac.util.usersettings.UserModel#}, which is an abstraction of the
16 * system's expeience with a user and canot be altered manually. As there is no
17 * fixed set of user settings, you can regard this class as a simple storage
18 * backend for key/value pairs.
20 * @author Alan Krempler
23 public class UserSettings implements Serializable {
25 private HashMap storage_;
28 storage_ = new HashMap();
34 * @return The string value associated with the key parameter; null, if
35 * nothing is stored under this key
37 public String getValue(String key) {
38 return (String) storage_.get(key);
43 * The key under which "value" is to be stored. Existing data
44 * unde the same key will be replaced.
46 * The value to be stored under "key"
47 * @return true in case of success, false in case of error, for example if
48 * trying to replace stored values without proper permissions
50 public boolean setValue(String key, String value) {
51 storage_.put(key, value);