public T get(final int index) { if (this.plainList != null) { return this.plainList.get(index); } final T t = cached.get(index); if (t != null) { return cached.get(index); } else { if (index != this.lastGetIndex || index < 0) { this.lastGet = super.get(index); if (this.lastGet == null) { throw new IndexOutOfBoundsException(); } this.lastGetIndex = index; } cached.put(index, this.lastGet); return this.lastGet; } }