class IntObjectMap<V> implements RamMap {

    private static final float DEFAULT_INITIAL_FACTOR = 0.25f;

    private final int maxSize;
    private volatile int currentSize;
    private volatile Object[] array;

    public IntObjectMap(int size) {
        this.maxSize = size;
        this.currentSize = (int) (size * DEFAULT_INITIAL_FACTOR);
        this.array = new Object[this.currentSize];
    }

    @SuppressWarnings("unchecked")
    public V get(int key) {
        if (key >= this.currentSize) {
            return null;
        }

        return (V) this.array[key];
    }

    public void set(int key, V value) {<FILL_FUNCTION_BODY>}

    @Override
    public void clear() {
        Arrays.fill(this.array, null);
    }

    @Override
    public long size() {
        return this.maxSize;
    }

    @Override
    public void writeTo(DataOutputStream buffer) throws IOException {
        throw new NotSupportException("IntObjectMap.writeTo");
    }

    @Override
    public void readFrom(DataInputStream buffer) throws IOException {
        throw new NotSupportException("IntObjectMap.readFrom");
    }

    private synchronized void expandCapacity() {
        if (this.currentSize == this.maxSize) {
            return;
        }
        int newSize = Math.min(this.currentSize * 2, this.maxSize);
        Object[] newArray = new Object[newSize];
        System.arraycopy(this.array, 0, newArray, 0, this.array.length);
        this.clear();
        this.array = newArray;
        this.currentSize = newSize;
    }
}

        if (key >= this.currentSize) {
            this.expandCapacity();
        }

        this.array[key] = value;
    
<no_super_class>