public <K> int binarySearch(K key, Comparator<? super K> comparator) {
    	return binarySearch(0, size(), key, comparator);
    }
Searches the specified range for an object using the binary
search algorithm.

@param key           the value to be searched for
@param comparator    the comparator by which the list is ordered.
                     A <tt>null</tt> value indicates that the elements'
                     {@linkplain Comparable natural ordering} should be used.
@return              index of the search key, if it is contained in the array;
                     otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
                     <i>insertion point</i> is defined as the point at which the
                     key would be inserted into the array: the index of the first
                     element greater than the key, or <tt>a.length</tt> if all
                     elements in the array 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 Arrays#binarySearch
jphp-runtime/src/php/runtime/memory/support/IList.java