public static Object cast(String value, int type) {
        if ((type == TYPE_INTEGER) || (type == TYPE_INTEGER_WRAPPER)) {
            return Integer.parseInt(value);
        }
        if ((type == TYPE_LONG) || (type == TYPE_LONG_WRAPPER)) {
            return Long.parseLong(value);
        }
        if ((type == TYPE_DOUBLE) || (type == TYPE_DOUBLE_WRAPPER)) {
            return Double.parseDouble(value);
        }
        return value;
    }