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 givenCliPrompter
to answer the givenQuestion
.boolean
canAsk
(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
Asker
is relevant for the givenQuestion
andIncrementalBuildState
- Returns:
- true if this
Asker
can and should drive the cli to answer the givenQuestion
.
-
askUnbound
Drive the given
CliPrompter
to 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
-