WeighingDelegate (final CompletionProgressIndicator indicator) { return new WeighingDelegate() { @Override public void waitFor() { indicator.addDelayedMiddleMatches(); } @Override public void consume(CompletionResult result) { if (ourIsInBatchUpdate.get().booleanValue()) { myBatchList.add(result); } else { indicator.addItem(result); } } }; }