private HelperGroup createSingleElementGroup(Helper helper) { HelperGroup hg = new HelperGroup(); hg.totalCapacity = helper.capacity; hg.helpers = new ArrayList<Helper>(); hg.helpers.add(helper); return hg; }
private HelperGroup createGroupWithExtraElement(HelperGroup group, Helper helper) { HelperGroup hg = new HelperGroup(); hg.totalCapacity = group.totalCapacity + helper.capacity; hg.helpers = new ArrayList<Helper>(group.helpers); hg.helpers.add(helper); return hg; }
private HelperGroup createEmptyGroup() { HelperGroup hg = new HelperGroup(); hg.totalCapacity = 0; hg.helpers = new ArrayList<Helper>(); return hg; }