public static <T> int searchIndexedBinary(T key, RandomAccessCol<T> col) {
		int low = 0;
		int high = col.size()-1;
	
		while (low <= high) {
		    int mid = (low + high) >>> 1;
//		    @SuppressWarnings("unchecked")
			Comparable<? super T> midVal = (Comparable<? super T>) col.get(mid);
		    int cmp = midVal.compareTo(key);
	
		    if (cmp < 0) {
				low = mid + 1;
			} else if (cmp > 0) {
				high = mid - 1;
			} else {
				return mid; // key found
			}
		}
		return -(low + 1);  // key not found
	}