public int lookup ( Object key , int hash ) { Object node ; int hash1 = hash ^ ( hash >>> 15 ) ; int hash2 = ( hash ^ ( hash << 6 ) ) | 1 ; //ensure coprimeness int deleted = - 1 ; for ( int i = hash1 & mask ; ; i = ( i + hash2 ) & mask ) { node = objs [ i ] ; if ( node == key ) return i ; if ( node == null ) return deleted >= 0 ? deleted : i ; if ( node == DELETED && deleted < 0 ) deleted = i ; } }
Find either the index of a key s value or the index of an available space .