Package berlin.yuna.survey.model.types
Class QuestionInt
- java.lang.Object
-
- berlin.yuna.survey.model.types.FlowItem<Integer,QuestionInt>
-
- berlin.yuna.survey.model.types.QuestionInt
-
- All Implemented Interfaces:
Comparable<FlowItem<?,?>>
public class QuestionInt extends FlowItem<Integer,QuestionInt>
-
-
Constructor Summary
Constructors Constructor Description QuestionInt(String label)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static QuestionInt
of(Enum<?> label)
static QuestionInt
of(String label)
Optional<Integer>
parse(ContextExchange exchange)
(Optional) Input converter to handle the answer - used to solveFlowItem.parseAndApply(ContextExchange, Function)
-
Methods inherited from class berlin.yuna.survey.model.types.FlowItem
addParent, answer, compareTo, diagram, equals, find, fromJson, get, get, get, getOrElse, getOrElse, getOrElse, hashCode, label, match, onBack, onBack, onBack, parents, parseAndAnswer, parseAndApply, parseAndRevert, revert, routes, target, target, target, target, targetGet, targetGet, targetGet, targets, targetsBack, toJson, toString, transitions
-
-
-
-
Constructor Detail
-
QuestionInt
public QuestionInt(String label)
-
-
Method Detail
-
parse
public Optional<Integer> parse(ContextExchange exchange)
Description copied from class:FlowItem
(Optional) Input converter to handle the answer - used to solveFlowItem.parseAndApply(ContextExchange, Function)
- Specified by:
parse
in classFlowItem<Integer,QuestionInt>
- Parameters:
exchange
- input parameter to be parsed for the condition of a configuredRoute
- Returns:
Optional.empty()
to used the default cast and JSON parserFlowItem.parseAndApply(ContextExchange, Function)
-
of
public static QuestionInt of(Enum<?> label)
-
of
public static QuestionInt of(String label)
-
-