private static <T> T getSingleDefault(T[] params, T default_value) {
        //assert params.length == 1;
        T value = default_value;
        if (params != null && params.length > 0)
            value = params[0];
        return value;
    }