@SuppressWarnings("unchecked")
    @Override
    public <K> int binarySearch(int index, int len, K key, Comparator<? super K> comparator) {
    	checkRange(index, len);

    	normalize();
    	return Arrays.binarySearch((Object[]) values, index, index+len, key, (Comparator<Object>) comparator);
    }
Deserialize a GapList object.

@param ois  input stream for serialization
@throws 	   IOException if serialization fails
@throws 	   ClassNotFoundException if serialization fails
jphp-runtime/src/php/runtime/memory/support/GapList.java