public BooleanValue evaluate(ValueFactory valueFactory, Value left, Value right) throws InvalidValueException { if (left.isFalse() || right.isFalse()) { return valueFactory.getFalse(); } else { return valueFactory.booleanValueOf(left.asBoolean() && right.asBoolean()); } }
@Override public BooleanValue evaluate( EvaluationVisitor evaluationVisitor, Value sourceVal, OperationCallExp operationCall) throws InvalidValueException { ValueFactory valueFactory = evaluationVisitor.getValueFactory(); if (sourceVal.isFalse()) { return valueFactory.getFalse(); } Value argVal = evaluateArgument(evaluationVisitor, operationCall, 0); return evaluate(valueFactory, sourceVal, argVal); }