Пример #1
0
 private HelperGroup createSingleElementGroup(Helper helper) {
   HelperGroup hg = new HelperGroup();
   hg.totalCapacity = helper.capacity;
   hg.helpers = new ArrayList<Helper>();
   hg.helpers.add(helper);
   return hg;
 }
Пример #2
0
 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;
 }
Пример #3
0
 private HelperGroup createEmptyGroup() {
   HelperGroup hg = new HelperGroup();
   hg.totalCapacity = 0;
   hg.helpers = new ArrayList<Helper>();
   return hg;
 }