code: public static <T extends Value> List<List<T>> split(List<T> input, long targetSize) {
          Collections.sort(input, new Comparator<Value>() {
              public int compare(Value o1, Value o2) {
                  return new Long(o1.getValue()).compareTo(new Long(o2.getValue()));
              }
          });
          List<T> smaller = new ArrayList<T>();
          List<T> bigger = new ArrayList<T>();
          for(T v: input) {
              if(v.getValue() >= targetSize) {
                  bigger.add(v);
              } else {
                  smaller.add(v);
              }
          }
          List<List<T>> ret = new ArrayList<List<T>>();
          for(T b: bigger) {
              List<T> elem = new ArrayList<T>();
              elem.add(b);
              ret.add(elem);
          }
  
          while(smaller.size()>0) {
              ret.add(removeBestSubset(smaller, targetSize));
          }
          return ret;
      }
docs: things that are too big get their own set