class EnvFunction extends FunctionExpressionImpl {

    @Override
    public Object evaluate(Object feature) {
        String varName = getExpression(0).evaluate(feature, String.class);
        Object value = localLookup.getTable().get(varName.toUpperCase());

        // No result - check the global lookup table
        if (value == null) {
            value = globalLookup.get(varName.toUpperCase());
        }

        // Still no result - check if there is a default
        if (value == null) {
            final int paramSize = getParameters().size();
            if (paramSize > NAME.getArgumentCount()) {
                value = getExpression(paramSize - 1).evaluate(feature);
            }
        }

        return value;
    }

    public  EnvFunction();

}