Class ParameterProperties
Helper class for dealing with ParameterProperty
s.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final List<nz.org.riskscape.engine.bind.ParameterProperty>
static final KeyValueProperty<String>
Specifies a base/template bookmark that should be incorporated into the bookmark that the user supplies.static final List<KeyValueProperty<?>>
static final KeyValueProperty<Double>
static final KeyValueProperty<Double>
static final KeyValueProperty<Double>
Used for the 'slider' widget where you can specify the increment you want the slider to go up in, e.g.static final KeyValueProperty<nz.org.riskscape.engine.typeset.IdentifiedType>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.bind.ParameterProperty>
Returns a property based on the given keyword and optional valuestatic List<nz.org.riskscape.problem.Problem>
checkCompatible
(nz.org.riskscape.engine.bind.ParameterProperty newProperty, Collection<nz.org.riskscape.engine.bind.ParameterProperty> existingProperties) static Optional<nz.org.riskscape.engine.bind.ParameterProperty>
getBindingClass
(Collection<nz.org.riskscape.engine.bind.ParameterProperty> properties) static Set<nz.org.riskscape.engine.bind.ParameterProperty>
Infers properties for a parameter based on its expected type.static Set<nz.org.riskscape.engine.bind.ParameterProperty>
Infers properties for a parameter based on the parameter's default valuestatic Set<nz.org.riskscape.engine.bind.ParameterProperty>
infer
(nz.org.riskscape.engine.rl.RealizedExpression defaultValue) Infers properties for a parameter based on its default value (a realized expression)
-
Field Details
-
MIN_VALUE
-
MAX_VALUE
-
STEP_INCREMENT
Used for the 'slider' widget where you can specify the increment you want the slider to go up in, e.g. $10000 increments instead of $1 increments.
-
BOOKMARK_TEMPLATE
Specifies a base/template bookmark that should be incorporated into the bookmark that the user supplies. E.g. if the parameter specifies HDF5 data, then the template bookmark may specify the datasets that should be read
-
TYPE
-
KEY_VALUE_PROPERTIES
-
ALL_PROPERTIES
-
AVAILABLE_KEYWORDS
-
-
Constructor Details
-
ParameterProperties
public ParameterProperties()
-
-
Method Details
-
find
- Returns:
- the ParameterProperty that matches the keyword given
-
checkCompatible
public static List<nz.org.riskscape.problem.Problem> checkCompatible(nz.org.riskscape.engine.bind.ParameterProperty newProperty, Collection<nz.org.riskscape.engine.bind.ParameterProperty> existingProperties) - Returns:
- any compatibility problems found in the list of properties, if any
-
build
public static nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.bind.ParameterProperty> build(nz.org.riskscape.engine.bind.BindingContext context, String keyword, Optional<?> rawValue) Returns a property based on the given keyword and optional value
-
infer
Infers properties for a parameter based on the parameter's default value
-
infer
public static Set<nz.org.riskscape.engine.bind.ParameterProperty> infer(nz.org.riskscape.engine.rl.RealizedExpression defaultValue) Infers properties for a parameter based on its default value (a realized expression)
-
infer
Infers properties for a parameter based on its expected type. This is more useful for wizard models where we are dealing with Java types rather than RiskScape expressions.
-
getBindingClass
public static Optional<Class<?>> getBindingClass(Collection<nz.org.riskscape.engine.bind.ParameterProperty> properties) - Returns:
- the class to use for binding a parameter, if any, based on the given properties
-