Package nz.org.riskscape.wizard.survey2
Class Choices
java.lang.Object
nz.org.riskscape.wizard.survey2.Choices
Helper for generating suitable Choice
s for wizard questions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionforAggregation
(IncrementalBuildState buildState) Returns a list of choices of aggregation functions for the wizard.forAggregationNonInteractive
(IncrementalBuildState buildState) Returns a list of choices of aggregation functions for the wizard.forBookmarks
(IncrementalBuildState buildState) forFunctions
(IncrementalBuildState buildState, Collection<nz.org.riskscape.engine.function.IdentifiedFunction.Category> matchCategories) forIdentified
(Question question, IncrementalBuildState buildState) forScope
(IncrementalBuildState buildState, Question q) from
(Question question, IncrementalBuildState buildState) percentiles
(nz.org.riskscape.engine.Project project)
-
Constructor Details
-
Choices
public Choices()
-
-
Method Details
-
forEnums
- Returns:
- choices the given enum entries. Useful when you want to only present a subset of the enum values to the user
-
forEnum
- Returns:
- choices for all the entries in the given enum
-
from
- Returns:
- choices that are suitable based on the given parameter type
-
forBookmarks
- Returns:
- choices for all the avilable bookmarks in the project
-
forFunctions
public static List<Choice> forFunctions(IncrementalBuildState buildState, Collection<nz.org.riskscape.engine.function.IdentifiedFunction.Category> matchCategories) - Returns:
- choices for any functions in the project that match the given categories
-
forScope
- Returns:
- Choices representing the attributes in scope for the current question
-
forScope
- Returns:
- Choices representing the attributes in scope for the given struct. This can be useful for getting a subset of attributes, e.g. just the hazard struct
-
percentiles
-
forAggregation
Returns a list of choices of aggregation functions for the wizard. Does not include non-maths functions or a few functions considered too complicated for wizard users.
-
forAggregationNonInteractive
Returns a list of choices of aggregation functions for the wizard. Does not include non-maths functions or a few functions considered too complicated for wizard users.
This non-interactive version replaces the multi-argument percentile function with a few hard-coded percentile choices.
-
forIdentified
-