ActionCallback () { if (isEmpty()) { return DONE; } ActionCallback result = new ActionCallback(myCallbacks.size()); Runnable doneRunnable = result.createSetDoneRunnable(); for (ActionCallback each : myCallbacks) { each.doWhenDone(doneRunnable).notifyWhenRejected(result); } return result; }