Package com.volantis.xml.expression.atomic

Examples of com.volantis.xml.expression.atomic.BooleanValue


     * @throws Exception if an error occurs
     */
    public void doTestFnBoolean(Sequence sequence, boolean expected)
            throws Exception {
        // invoke the method
        BooleanValue result = PipelineExpressionHelper.fnBoolean(sequence);
        // check the result
        assertEquals("unexpected fnBoolean(Sequence) result",
                     expected,
                     result.asJavaBoolean());

    }
View Full Code Here


    public void doTestNot(Sequence sequence) throws Exception {
        // invoke the method
        boolean expected  =
                !(PipelineExpressionHelper.fnBoolean(sequence).asJavaBoolean());

        BooleanValue actual = PipelineExpressionHelper.fnNot(sequence);

        // check the result
        assertEquals("unexpected fnBoolean(Sequence) result",
                     expected,
                     actual.asJavaBoolean());

    }
View Full Code Here

     * @return the boolean representation of the sequence argument
     */
    public static BooleanValue fnBoolean(Sequence sequence)
            throws ExpressionException {

        BooleanValue eval = BooleanValue.TRUE;
        int length = sequence.getLength();

        if (length == 0) {
            // if empty sequence then return false
            eval = BooleanValue.FALSE;
View Full Code Here

    // javadoc inherited
    public Object computeValue(EvalContext evalContext) {

        // return value
        BooleanValue eval = BooleanValue.FALSE;

        // evaluated value of the current operand
        Object operandEval;

        for (int i = 0;
             i < args.length && !eval.asJavaBoolean(); // breakout if eval true
             i++) {
            // evaluate each operand of the OR expression.
            // If any evalute to true then the OR expression evaluates to true
            // and true is returned
View Full Code Here

    }

    // javadoc inherited
    public Object computeValue(EvalContext evalContext) {
        // return value
        BooleanValue eval = BooleanValue.TRUE;

        // evaluated value of the current operand
        Object operandEval;

        for (int i = 0;
             i < args.length && eval.asJavaBoolean() == true;
             i++) {
            // evaluate each operand of this and expression.
            // If any evalute to false then the expression fails and
            // false is returned.
View Full Code Here

            return value;
        }

        // javadoc inhertied
        public void visit(ImmutableBooleanValue immutableBooleanValue) {
            BooleanValue boolValue = expressionFactory.createBooleanValue(
                    immutableBooleanValue.getValueAsBoolean().booleanValue());

            if (sequenceItems == null) {
                // not creating a sequence of items set the value to be
                // the bool
View Full Code Here

TOP

Related Classes of com.volantis.xml.expression.atomic.BooleanValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.