@Test public void testGettingAYetNoncomputableValue() { String question1Text = "question: \"Label\" boolean"; String question2Text = "question2: \"Label\" boolean(question != true)"; Form form = FormBuilder.build(TestHelper.buildForm("form1", question1Text, question2Text)); assertThat(new Evaluator(form).getValue(QUESTION2)).isEqualTo(UNDEFINED); }
public Value getValue(final Identifier variable) { return this.answers.getValue(variable); }
Evaluator implements FormVisitor<Void>, StatementVisitor<Void> { public Value getValue(final Identifier variable) { return this.answers.getValue(variable); } }
Evaluator implements FormVisitor<Void>, StatementVisitor<Void> { public Value getValue(final Identifier variable) { return this.answers.getValue(variable); } Evaluator(final Form form); }
Evaluator implements FormVisitor<Void>, StatementVisitor<Void> { public Value getValue(final Identifier variable) { return this.answers.getValue(variable); } Evaluator(final Form form); Value getValue(final Identifier variable); Value getValue(final Conditional conditional); void updateValue(final Identifier variable, final Value value); void addListener(final Computable computable, final ValueChangeListener<Value> listener); @Override Void visit(final Form form); @Override Void visit(final Question question); @Override Void visit(final ComputedQuestion question); @Override Void visit(final Conditional conditional); }
Evaluator implements FormVisitor<Void>, StatementVisitor<Void> { public Value getValue(final Identifier variable) { return this.answers.getValue(variable); } Evaluator(final Form form); Value getValue(final Identifier variable); Value getValue(final Conditional conditional); void updateValue(final Identifier variable, final Value value); void addListener(final Computable computable, final ValueChangeListener<Value> listener); @Override Void visit(final Form form); @Override Void visit(final Question question); @Override Void visit(final ComputedQuestion question); @Override Void visit(final Conditional conditional);  }