FileGroup (final Parent possibleParent, final FileGroup fromGroup) { FileGroup ownGroup = myGroupHolder.get(fromGroup.getId()); if (ownGroup == null) { ownGroup = new FileGroup(fromGroup.getUpdateName(), fromGroup.getStatusName(), fromGroup.getSupportsDeletion(), fromGroup.getId(), fromGroup.myCanBeAbsent); possibleParent.accept(ownGroup); myGroupHolder.put(fromGroup.getId(), ownGroup); } return ownGroup; }