Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 private HelperGroup createEmptyGroup() {
   HelperGroup hg = new HelperGroup();
   hg.totalCapacity = 0;
   hg.helpers = new ArrayList<Helper>();
   return hg;
 }