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);
}
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.
@throws IndexOutOfBoundsException if <tt>to!=from-1 || from&lt;0 || from&gt;to || to&gt;=size()</tt>.