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 Type
    Method
    Description
    nz.org.riskscape.problem.ResultOrProblems<Object>
    Drive the given CliPrompter to answer the given Question.
    boolean
    canAsk(nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question)
    Determine whether this Asker is relevant for the given Question and IncrementalBuildState
  • 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 given Question and IncrementalBuildState

      Returns:
      true if this Asker can and should drive the cli to answer the given Question.
    • askUnbound

      nz.org.riskscape.problem.ResultOrProblems<Object> askUnbound(AskRequest input)

      Drive the given CliPrompter to answer the given Question. Assume that canAsk(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