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

liqp.nodes.GtNode Maven / Gradle / Ivy

package liqp.nodes;

import liqp.LValue;

import java.util.Map;

class GtNode extends LValue implements LNode {

    private LNode lhs;
    private LNode rhs;

    public GtNode(LNode lhs, LNode rhs) {
        this.lhs = lhs;
        this.rhs = rhs;
    }

    @Override
    public Object render(Map context) {

        Object a = lhs.render(context);
        Object b = rhs.render(context);

        return (a instanceof Number) && (b instanceof Number) &&
                super.asNumber(a).doubleValue() > super.asNumber(b).doubleValue();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy