question: public boolean ensureValid ( Object value ) { int count = - 1 ; try { Collection < ? > collection = ( Collection < ? > ) value ; count = collection . size ( ) ; } catch ( Exception e ) { try { count = Array . getLength ( value ) ; } catch ( IllegalArgumentException e2 ) { } } return ensureValid ( count ) ; }
target:  Ensures the bounds are valid values for the object passed in.<p> Returns false if the object is not indexable or if the numeric range is out of bounds.