T (int index) { if (index >= 0 && index < finalSize) { int from = 0; for (List<? extends T> each : lists) { if (from <= index && index < from + each.size()) { return each.get(index - from); } from += each.size(); } if (from != finalSize) { throw new ConcurrentModificationException("The list has changed. Its size was " + finalSize + "; now it's " + from); } } throw new IndexOutOfBoundsException("index: " + index + "; size: " + size()); }