static MultiMap multiMapFromKeyAndValueField(Collection l, S keyField, S valueField) { new MultiMap mm; for (O o : l) mm.put((A) getOpt(o, keyField), (B) getOpt(o, valueField)); ret mm; }