/** * Refresh the editors in case the backing list has been modified from * outside the ListEditorWrapper list. * <p> * This is basically the opposite from {@link #flush()}. It's used to * reuse sub-editors instead of recreating a ListEditorWrapper from * scratch. */ void refresh() { int i = 0; for (T item : backing) { if (i < size()) { this.set(i, item); } else { assert i == size(); this.add(i, item); } i++; } while (backing.size() < size()) { remove(size() - 1); } assert backing.size() == size(); assert backing.equals(workingCopy); } }
/** * Refresh the editors in case the backing list has been modified from * outside the ListEditorWrapper list. * <p> * This is basically the opposite from {@link #flush()}. It's used to * reuse sub-editors instead of recreating a ListEditorWrapper from * scratch. */ void refresh() { int i = 0; for (T item : backing) { if (i < size()) { this.set(i, item); } else { assert i == size(); this.add(i, item); } i++; } while (backing.size() < size()) { remove(size() - 1); } assert backing.size() == size(); assert backing.equals(workingCopy); } }
/** * Refresh the editors in case the backing list has been modified from * outside the ListEditorWrapper list. * <p> * This is basically the opposite from {@link #flush()}. It's used to * reuse sub-editors instead of recreating a ListEditorWrapper from * scratch. */ void refresh() { int i = 0; for (T item : backing) { if (i < size()) { this.set(i, item); } else { assert i == size(); this.add(i, item); } i++; } while (backing.size() < size()) { remove(size() - 1); } assert backing.size() == size(); assert backing.equals(workingCopy); } }