Package nz.org.riskscape.engine.ini
Class IniFileParameterBuilder
java.lang.Object
nz.org.riskscape.engine.ini.IdentifiedObjectBuilder.Base<nz.org.riskscape.engine.bind.UserDefinedParameter>
nz.org.riskscape.engine.ini.IniFileParameterBuilder
- All Implemented Interfaces:
IdentifiedObjectBuilder<nz.org.riskscape.engine.bind.UserDefinedParameter>
public class IniFileParameterBuilder
extends IdentifiedObjectBuilder.Base<nz.org.riskscape.engine.bind.UserDefinedParameter>
Builds a user-defined parameter from an INI definition.
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.ini.IdentifiedObjectBuilder
IdentifiedObjectBuilder.Base<T extends nz.org.riskscape.engine.Identified>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.bind.UserDefinedParameter>
Builds the item based on the given INI section.nz.org.riskscape.engine.bind.ParameterTemplate
getSettings
(nz.org.riskscape.engine.bind.ParameterTemplate template) Methods inherited from class nz.org.riskscape.engine.ini.IdentifiedObjectBuilder.Base
getIdentifiedClass, getKeyword
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.ini.IdentifiedObjectBuilder
addToProject
-
Field Details
-
PARAMETER_KEY
The INI file keyword, i.e. denotes a
[parameter foo]
section.- See Also:
-
TEMPLATE
- See Also:
-
KEYS
Specifies the INI file keys that the
[parameter xyz]
section can contain -
PROBLEMS
public static final nz.org.riskscape.engine.ini.IniFileParameterBuilder.LocalProblems PROBLEMS
-
-
Constructor Details
-
IniFileParameterBuilder
public IniFileParameterBuilder(nz.org.riskscape.engine.Project project)
-
-
Method Details
-
getSettings
public static List<nz.org.riskscape.engine.util.Pair<String,String>> getSettings(nz.org.riskscape.engine.bind.ParameterTemplate template) - Returns:
- the effective settings for a
ParameterTemplate
, i.e. the config required to build it
-
build
public nz.org.riskscape.engine.bind.ParameterTemplate build(Map<String, List<String>> config) throws nz.org.riskscape.problem.ProblemException- Throws:
nz.org.riskscape.problem.ProblemException
-
build
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.bind.UserDefinedParameter> build(String id, nz.org.riskscape.config.ConfigSection section) Description copied from interface:IdentifiedObjectBuilder
Builds the item based on the given INI section.
- Returns:
- the item successfully built, or any problems that occurred.
-