class Stack {

    public E set(int index, E value) {
        if (index >= mSize || index + mSize < 0) {
            throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
        }

        return mElements.set(index < 0 ? index + mSize : index, value);
    }

    public  Stack();

}