|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwebeq3.util.OptionsInfo
public class OptionsInfo
This class facilitates the loading and saving of options from or to a file.
| Constructor Summary | |
|---|---|
OptionsInfo()
Constructs a OptionsInfo object. |
|
OptionsInfo(java.lang.String file)
Constructs a OptionsInfo object with the specified file. |
|
| Method Summary | |
|---|---|
void |
clearOptions()
Clears all the loaded options. |
java.lang.String |
getFile()
Returns the absolute path for the options file. |
java.lang.String |
getOption(java.lang.String key)
Returns the option value specified by the key. |
boolean |
isEmpty()
Returns true if there is no option loaded yet, returns false otherwise. |
void |
readOptions()
Loads all of the options from the specified file. |
void |
setFile(java.lang.String file)
Sets the absolute path for the options file. |
void |
setOption(java.lang.String key,
java.lang.String value)
Maps the specified option key to the specified option value. |
boolean |
writeOptions()
Saves all of the options in the format of "key=value" to the specified file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptionsInfo()
public OptionsInfo(java.lang.String file)
file - the absolute path of the file that this OptionsInfo object loads
from and saves to| Method Detail |
|---|
public void clearOptions()
public java.lang.String getFile()
public java.lang.String getOption(java.lang.String key)
key - key of the option
public boolean isEmpty()
public void readOptions()
public void setFile(java.lang.String file)
file - the absolute path for the options file
public void setOption(java.lang.String key,
java.lang.String value)
The value can be retrieved by calling the get method with a
key that is equal to the original key.
key - the key of the optionvalue - the value of the optionpublic boolean writeOptions()
|
Copyright (c) 2015 Design Science All rights reserved |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||