for (int i = 0; i < qps.length; i++)
for (int i = 0; i < defs.length; i++)
    protected void checkParameters(){                if (defs == null)            throw new IllegalStateException(                    "Query parameter definitions not set.");                if (qps == null)             throw new IllegalArgumentException(                    "Null arrays "+                    "are not valid for definitions.");                if (defs.length > qps.length)            throw new IllegalArgumentException(                    "As many Query parameters needed " +                    "as Query parameter defitions. Currently missing "+                    (defs.length-qps.length));                for (int i = 0; i < qps.length; i++)        {            QueryParameter parameter = qps[i];            QueryParameterDef def = defs[i];                        if (!def.name.equals(parameter.name))                throw new IllegalArgumentException(                        String.format(                        " Parameter name %d doesn't match: %s != %s",                        i,def.name,parameter.name                        ));                        if ( parameter.type == null )            {                if (! def.optional)                    throw new IllegalArgumentException("Parameter type cannot " +                            "be null if not optional.");                            } else {                if (!def.type.isAssignableFrom(parameter.type))                        throw new IllegalArgumentException(                                String.format(                                        " Parameter type %d doesn't match: %s != %s",                                        i,def.type,parameter.type));                        }                        }            }