code: public int binarySearchFromTo(Object key, int from, int to, java.util.Comparator comparator) {
    //return cern.colt.Sorting.binarySearchFromTo(this.elements,key,from,to,comparator);
    return java.util.Arrays.binarySearch(this.elements,key);
  }
docs: Searches the receiver for the specified value using
  the binary search algorithm. The receiver must be sorted into ascending order
  according to the specified comparator.  All elements in the
  range must be <i>mutually comparable</i> by the specified comparator
  (that is, <tt>c.compare(e1, e2)</tt> must not throw a
  <tt>ClassCastException</tt> for any elements <tt>e1</tt> and
  <tt>e2</tt> in the range).<p>
  
  If the receiver is not sorted, the results are undefined: in particular, the call
  may enter an infinite loop.  If the receiver contains multiple elements
  equal to the specified object, there is no guarantee which instance
  will be found.
  
  
  @param key the value to be searched for.
  @param from the leftmost search position, inclusive.
  @param to the rightmost search position, inclusive.
  @param comparator the comparator by which the receiver is sorted.
  @throws ClassCastException if the receiver contains elements that are not
  <i>mutually comparable</i> using the specified comparator.
  @return index of the search key, if it is contained in the receiver;
  otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The <i>insertion
  point</i> is defined as the the point at which the value would
  be inserted into the receiver: the index of the first
  element greater than the key, or <tt>receiver.size()</tt>, if all
  elements in the receiver are less than the specified key.  Note
  that this guarantees that the return value will be &gt;= 0 if
  and only if the key is found.
  @see cern.colt.Sorting
  @see java.util.Arrays
  @see java.util.Comparator