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

com.jfirer.jfireel.expression.node.impl.GtNode Maven / Gradle / Ivy

package com.jfirer.jfireel.expression.node.impl;

import java.util.Map;
import com.jfirer.jfireel.expression.token.Operator;
import com.jfirer.jfireel.expression.util.number.GtUtil;

public class GtNode extends OperatorResultNode
{
    public GtNode()
    {
        super(Operator.GT);
    }
    
    @Override
    public Object calculate(Map variables)
    {
        Object leftValue = leftOperand.calculate(variables);
        if (leftValue == null)
        {
            return null;
        }
        Object rightValue = rightOperand.calculate(variables);
        if (rightValue == null)
        {
            return null;
        }
        return GtUtil.calculate((Number) leftValue, (Number) rightValue);
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy