Package org.pdf4j.saxon.functions

Examples of org.pdf4j.saxon.functions.BooleanFn


    public Expression negate() {
        // Apply de Morgan's laws
        if (operator == Token.AND) {
            // not(A and B) ==> not(A) or not(B)
            BooleanFn not0 = (BooleanFn)SystemFunction.makeSystemFunction("not", new Expression[]{operand0});
            BooleanFn not1 = (BooleanFn)SystemFunction.makeSystemFunction("not", new Expression[]{operand1});
            return new BooleanExpression(not0, Token.OR, not1);
        } else {
            // not(A or B) => not(A) and not(B)
            BooleanFn not0 = (BooleanFn)SystemFunction.makeSystemFunction("not", new Expression[]{operand0});
            BooleanFn not1 = (BooleanFn)SystemFunction.makeSystemFunction("not", new Expression[]{operand1});
            return new BooleanExpression(not0, Token.AND, not1);
        }
    }
View Full Code Here

TOP

Related Classes of org.pdf4j.saxon.functions.BooleanFn

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.