public abstract class BaseParameters extends Object implements IParameters
| Modifier and Type | Field and Description |
|---|---|
protected String |
path
Current path of the parameter file.
|
| Constructor and Description |
|---|
BaseParameters()
Creates a new BaseParameters object with a null path.
|
| Modifier and Type | Method and Description |
|---|---|
ParametersDescription |
getParametersDescription()
Gets the description of the parameters.
|
String |
getPath()
Gets the full path of the last file where the parameters where loaded
from or saved to.
|
void |
load(InputStream inStream,
boolean ignoreErrors)
Loads the parameters from a file.
|
void |
load(URL inputURL,
boolean ignoreErrors)
Loads the parameters from a file.
|
void |
save(String newPath)
Saves the parameters to a file.
|
void |
setPath(String filePath)
Sets the full path of the file where the parameters are to be
saved to.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfromString, getBoolean, getInteger, getString, reset, setBoolean, setInteger, setString, toStringprotected String path
public BaseParameters()
public String getPath()
IParametersgetPath in interface IParameterspublic void setPath(String filePath)
IParameterssetPath in interface IParametersfilePath - the full path to set.public void load(URL inputURL, boolean ignoreErrors)
IParametersload in interface IParametersinputURL - URL of the parameters file to load.ignoreErrors - true if the load should ignore any error
such as file not found. If an error occurs and this is set to true,
the method should create the parameters object with its default values.public void load(InputStream inStream, boolean ignoreErrors)
IParametersload in interface IParametersinStream - input stream with the parameters to load.ignoreErrors - true if the load should ignore any error
such as file not found. If an error occurs and this is set to true,
the method should create the parameters object with its default values.public void save(String newPath)
IParameterssave in interface IParametersnewPath - the full path of the parameters file to save.public ParametersDescription getParametersDescription()
IParametersgetParametersDescription in interface IParametersCopyright © 2021. All rights reserved.