void (final int index, final Content obj) { if (index < 0) { throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size()); } int adj = resync(index); if (adj == size && index > size()) { throw new IndexOutOfBoundsException("Index: " + index + " Size: " + size()); } if (filter.matches(obj)) { ContentList.this.add(adj, obj); // we can optimise the laziness now by doing a partial reset on // the backing list... invalidate everything *after* the added // content if (backingpos.length <= size) { backingpos = Arrays.copyOf(backingpos, backingpos.length + 1); } backingpos[index] = adj; backingsize = index + 1; xdata = getDataModCount(); } else { throw new IllegalAddException("Filter won't allow the " + obj.getClass().getName() + " '" + obj + "' to be added to the list"); } }