class IntRWHashMap<V> implements IntMap<V> {
    /** RW Lock. */
    private final ReadWriteLock lock = new ReentrantReadWriteLock();

    /** Map delegate. */
    private final IntHashMap<V> delegate;

    /** Default constructor. */
    public IntRWHashMap() {
        delegate = new IntHashMap<>();
    }

    /** {@inheritDoc} */
    @Override public V get(int key) {
        lock.readLock().lock();
        try {
            return delegate.get(key);
        }
        finally {
            lock.readLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public V put(int key, V val) {
        lock.writeLock().lock();
        try {
            return delegate.put(key, val);
        }
        finally {
            lock.writeLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public V remove(int key) {
        lock.writeLock().lock();
        try {
            return delegate.remove(key);
        }
        finally {
            lock.writeLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public V putIfAbsent(int key, V val) {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public <E extends Throwable> void forEach(EntryConsumer<V, E> act) throws E {
        lock.readLock().lock();
        try {
            delegate.forEach(act);
        }
        finally {
            lock.readLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public int size() {
        lock.readLock().lock();
        try {
            return delegate.size();
        }
        finally {
            lock.readLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public boolean isEmpty() {
        return size() == 0;
    }

    /** {@inheritDoc} */
    @Override public int[] keys() {
        lock.readLock().lock();
        try {
            return delegate.keys();
        }
        finally {
            lock.readLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public Collection<V> values() {
        lock.readLock().lock();
        try {
            return delegate.values();
        }
        finally {
            lock.readLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public boolean containsKey(int key) {
        lock.readLock().lock();
        try {
            return delegate.containsKey(key);
        }
        finally {
            lock.readLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public boolean containsValue(V val) {
        lock.readLock().lock();
        try {
            return delegate.containsValue(val);
        }
        finally {
            lock.readLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public void clear() {
        lock.writeLock().lock();
        try {
            delegate.clear();
        }
        finally {
            lock.writeLock().unlock();
        }
    }

    /** {@inheritDoc} */
    @Override public String toString() {
        lock.readLock().lock();
        try {
            return delegate.toString();
        }
        finally {
            lock.readLock().unlock();
        }
    }
}

        lock.writeLock().lock();
        try {
            return delegate.putIfAbsent(key, val);
        }
        finally {
            lock.writeLock().unlock();
        }
    
<no_super_class>