protected static void checkRangeFromTo ( int from , int to , int theSize ) { if ( to == from - 1 ) return ; if ( from < 0 || from > to || to >= theSize ) throw new IndexOutOfBoundsException ( "from: " + from + ", to: " + to + ", size=" + theSize ) ; }
Checks if the given range is within the contained array s bounds .