code: public boolean isSortedFromTo(int from, int to) {
  	if (size==0) return true;
  	checkRangeFromTo(from, to, size);
  	
  	Object[] theElements = elements;
  	for (int i=from+1; i<=to; i++ ) {
  		if (((Comparable)theElements[i]).compareTo((Comparable) theElements[i-1]) < 0) return false;
  	}
  	return true;
  }
docs: Determines whether the receiver is sorted ascending, according to the <i>natural ordering</i> of its
  elements.  All elements in this range must implement the
  <tt>Comparable</tt> interface.  Furthermore, all elements in this range
  must be <i>mutually comparable</i> (that is, <tt>e1.compareTo(e2)</tt>
  must not throw a <tt>ClassCastException</tt> for any elements
  <tt>e1</tt> and <tt>e2</tt> in the array).<p>
  
  @param from the index of the first element (inclusive) to be sorted.
  @param to the index of the last element (inclusive) to be sorted.
  @return <tt>true</tt> if the receiver is sorted ascending, <tt>false</tt> otherwise.
  @exception IndexOutOfBoundsException index is out of range (<tt>size()&gt;0 && (from&lt;0 || from&gt;to || to&gt;=size())</tt>).