Package nz.org.riskscape.wizard.ask
Interface Asker
- All Known Implementing Classes:
AggregationFunctionPrototypeAsker,AskAsAsker,AttributeAsker,BaseAsker,BooleanExpressionAsker,ChoiceAsker,CompatAsker,CompositeAsker,DefaultAsker,ExpressionAsker
public interface Asker
Drives a CliPrompter to make it easier for the user to answer it correctly for
a particular Question
-
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.problem.ResultOrProblems<Object>askUnbound(AskRequest input) Drive the givenCliPrompterto answer the givenQuestion.booleancanAsk(nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question)
-
Method Details
-
canAsk
boolean canAsk(nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question) Determine whether this
Askeris relevant for the givenQuestionandIncrementalBuildState- Returns:
- true if this
Askercan and should drive the cli to answer the givenQuestion.
-
askUnbound
Drive the given
CliPrompterto answer the givenQuestion. Assume thatcanAsk(IncrementalBuildState, Question)has already been tested and returned true.- Returns:
- an unbound object that should be able to be bound to a value of the type in the input's question, or problems if it failed
-