All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.xolite.expressions.jaxb_subst.BooleanExpression Maven / Gradle / Ivy

package net.sf.xolite.expressions.jaxb_subst;


import javax.xml.bind.annotation.XmlSeeAlso;


@XmlSeeAlso( { FalseExpression.class, TrueExpression.class, VariableExpression.class, CompositeExpression.class })
public abstract class BooleanExpression {


    /**
     * Checks that all the expressions have correct number of operands and that all the used variables are defined.
     * 
     * @param context
     *            the context holding the variables values.
     * @throw IllegalStateException if the expression is incorrect.
     */
    public abstract void validate(ExpressionContext context);


    /**
     * Evaluate the expression against the context.
     * 
     * @param context
     *            the context holding the variables values.
     * @throw IllegalStateException if the expression is incorrect.
     * @return value of this boolean expression.
     */
    public abstract boolean evaluate(ExpressionContext context);


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy