private void init(Type t){
        if(t==null){
            type = TYPE_NULL;
            g=null;
        }else if(t instanceof Integer){
            type = TYPE_INTEGER;
            g=t;
        }else if(t instanceof Long){
            type = TYPE_LONG;
            g=t;
        }else if(t instanceof Double){
            type = TYPE_DOUBLE;
            g=t;
        }else if(t instanceof Boolean){
            type = TYPE_BOOLEAN;
            g=t;
        }else if(t instanceof String){
            type = TYPE_STRING;
            g=t;
        }else if(t instanceof HashMap){
            type = TYPE_OBJECT;
            o=(HashMap)t;
        }else{
            throw new IllegalArgumentException("Bad class type: '"+t.getClass()+"' is not recognized.");
        }
    }