Esempio n. 1
0
 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());
   }
 }
Esempio n. 2
0
 @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);
 }