src/main/java/org/dmfs/iterators/utils/SlimSet.java
private static int predictedPosition(final Object[] array, final Object object, final int hash)
    {
        int arraySize = array.length;
        int i = Math.abs(hash) % arraySize;

        Object element = array[i];
        while (element != null) // the load factor guarantees that there is always at least one free slot
        {
            if (element.equals(object))
            {
                // already in the array
                return i;
            }
            // the position is taken, try the next slot
            i = (i + 1) % arraySize;
            element = array[i];
        }
        return i;
    }
private static int predictedPosition(final Object[] array, final Object object, final int hash)
    {
        int arraySize = array.length;
        int i = Math.abs(hash) % arraySize;

        Object element = array[i];
        while (element != null) // the load factor guarantees that there is always at least one free slot
        {
            if (element.equals(object))
            {
                // already in the array
                return i;
            }
            // the position is taken, try the next slot
            i = (i + 1) % arraySize;
            element = array[i];
        }
        return i;
    }
private static int predictedPosition ( final Object [ ] array , final Object object , final int hash ) { int arraySize = array . length ; int i = Math . abs ( hash ) % arraySize ; Object element = array [ i ] ; while ( element != null ) // the load factor guarantees that there is always at least one free slot { if ( element . equals ( object ) ) { // already in the array return i ; } // the position is taken, try the next slot i = ( i + 1 ) % arraySize ; element = array [ i ] ; } return i ; }
Calculates the position of the given element in the given array. The value at the calculated position will be
<code>null</code> if the element doesn't exist in the array, otherwise the position will point to the element.

@param array
@param object

@return
Calculates the position of the given element in the given array . The value at the calculated position will be <code > null< / code > if the element doesn t exist in the array otherwise the position will point to the element .