Class Choice

java.lang.Object
nz.org.riskscape.wizard.Choice

public class Choice extends Object

Represents a predefined option, or 'choice', that the user can make when configuring model parameter or wizard question.

  • Field Details

    • description

      protected final Optional<String> description

      Extra help information to describe the choice

  • Constructor Details

  • Method Details

    • getDescription

      public String getDescription(nz.org.riskscape.engine.i18n.TranslationContext context)
    • getLabel

      public String getLabel(nz.org.riskscape.engine.i18n.TranslationContext context)
    • toParameter

      public nz.org.riskscape.engine.bind.ParameterTemplate.Choice toParameter(nz.org.riskscape.engine.i18n.TranslationContext context)
      Returns:
      a choice that can be passed up to the Platform UI
    • getDerivedFrom

      public <T> T getDerivedFrom(Class<T> asType)

      Convenience to return the underlying object in the correct type

    • isA

      public <T> Optional<T> isA(Class<T> asType)

      Checks if the underlying object is of the given type, and returns it if so

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getValue

      public String getValue()

      The actual value that gets bound and turned into pipeline code