ActionCallback (Set<Object> elements) { if (elements.isEmpty()) return ActionCallback.DONE; ActionCallback result = new ActionCallback(elements.size()); for (Object hangElement : elements) { if (!myAdjustmentCause2Adjustment.containsKey(hangElement)) { processHangByParent(hangElement).notify(result); } else { result.setDone(); } } return result; }