public class Preference
extends java.lang.Object
This project was carried out at:
and supported byGenOpt Copyright (c) 1998-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
Modifier and Type | Field and Description |
---|---|
protected java.io.File |
file
Preference file
|
protected java.util.TreeMap<java.lang.String,java.lang.String> |
list
list with settings
|
private static java.lang.String[][] |
MAP
valid keywords
|
Constructor and Description |
---|
Preference(java.io.File preferenceFile)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all mappings
|
java.lang.Object |
get(java.lang.Object key)
Returns the value to which this map maps the specified key.
|
static void |
main(java.lang.String[] args) |
java.lang.String |
put(java.lang.String key,
java.lang.String value)
Associates the specified value with the specified key in this map.
|
private void |
setDefault()
Sets default values.
|
void |
write()
Writes the Preference file
|
private static final java.lang.String[][] MAP
protected java.util.TreeMap<java.lang.String,java.lang.String> list
protected java.io.File file
public Preference(java.io.File preferenceFile)
preferenceFile
- the Preference fileprivate void setDefault()
public java.lang.String put(java.lang.String key, java.lang.String value)
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.public java.lang.Object get(java.lang.Object key)
key
- key whose associated value is to be returned.public void clear()
public void write()
public static void main(java.lang.String[] args)