class LinearProbeLongLongHashMap extends AbstractLongIterable implements MutableLongLongMap, Resource {

    @Override
    public long updateValue( long key, long initialValueIfAbsent, LongToLongFunction function )
    {
        ++modCount;

        if ( isSentinelKey( key ) )
        {
            return updateValueForSentinelKey( key, initialValueIfAbsent, function );
        }

        final int idx = indexOf( key );
        final long keyAtIdx = getKeyAt( idx );

        if ( keyAtIdx == key )
        {
            final long newValue = function.applyAsLong( getValueAt( idx ) );
            setValueAt( idx, newValue );
            return newValue;
        }

        if ( keyAtIdx == REMOVED_KEY )
        {
            --removals;
        }

        final long value = function.applyAsLong( initialValueIfAbsent );

        setKeyAt( idx, key );
        setValueAt( idx, value );

        ++entriesInMemory;
        if ( entriesInMemory >= resizeOccupancyThreshold )
        {
            growAndRehash();
        }

        return value;
    }

      LinearProbeLongLongHashMap( MemoryAllocator allocator );

}