|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgenopt.util.Preference
public class Preference
Object to read and store user preference.
This project was carried out at:
and supported byGenOpt Copyright (c) 1998-2011, 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.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
Preference(java.io.File preferenceFile)
constructor |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String[][] MAP
protected java.util.TreeMap<java.lang.String,java.lang.String> list
protected java.io.File file
| Constructor Detail |
|---|
public Preference(java.io.File preferenceFile)
preferenceFile - the Preference file| Method Detail |
|---|
private 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||