Class ParameterProperties

java.lang.Object
nz.org.riskscape.engine.bind.ParameterProperties

public class ParameterProperties extends Object

Helper class for dealing with ParameterPropertys.

  • Field Details

    • MIN_VALUE

      public static final KeyValueProperty<Double> MIN_VALUE
    • MAX_VALUE

      public static final KeyValueProperty<Double> MAX_VALUE
    • STEP_INCREMENT

      public static final KeyValueProperty<Double> 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

      public static final KeyValueProperty<String> 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

      public static final KeyValueProperty<nz.org.riskscape.engine.typeset.IdentifiedType> TYPE
    • KEY_VALUE_PROPERTIES

      public static final List<KeyValueProperty<?>> KEY_VALUE_PROPERTIES
    • ALL_PROPERTIES

      public static final List<nz.org.riskscape.engine.bind.ParameterProperty> ALL_PROPERTIES
    • AVAILABLE_KEYWORDS

      public static final List<String> AVAILABLE_KEYWORDS
  • Constructor Details

    • ParameterProperties

      public ParameterProperties()
  • Method Details

    • find

      public static Optional<nz.org.riskscape.engine.bind.ParameterProperty> find(String keyword)
      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

      public static Set<nz.org.riskscape.engine.bind.ParameterProperty> infer(Object defaultValue)

      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)

    • 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