001    package railo.runtime.interpreter.ref.op;
002    
003    import railo.runtime.PageContext;
004    import railo.runtime.exp.PageException;
005    import railo.runtime.interpreter.ref.Ref;
006    import railo.runtime.interpreter.ref.RefSupport;
007    import railo.runtime.op.Operator;
008    
009    /**
010     * imp operation
011     */
012    public final class Imp extends RefSupport implements Ref {
013    
014        private Ref right;
015        private Ref left;
016    
017        /**
018         * constructor of the class
019         * @param left
020         * @param right
021         */
022        public Imp(Ref left, Ref right) {
023            this.left=left;
024            this.right=right;
025        }
026    
027        @Override
028            public Object getValue(PageContext pc) throws PageException {
029            return Operator.imp(left.getValue(pc),right.getValue(pc))?Boolean.TRUE:Boolean.FALSE;
030        }
031    
032        @Override
033        public String getTypeName() {
034            return "operation";
035        }
036    }