/******************************************************************************* *******************************************************************************/ package at.gv.egiz.eaaf.core.impl.idp.process.test; import java.util.Objects; import org.apache.commons.lang3.BooleanUtils; import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluationContext; import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluator; /** * Expression evaluator that guesses the boolean value from a String. Refer to {@link BooleanUtils#toBoolean(String)} * for further information. * * @author tknall * */ public class BooleanStringExpressionEvaluator implements ExpressionEvaluator { @Override public boolean evaluate(ExpressionEvaluationContext expressionContext, String expression) { return BooleanUtils.toBoolean(Objects.requireNonNull(expression, "Expression must not be null.")); } }