// o is either a map already (string->object) or an arbitrary object, // in which case its fields are converted into a map. static Map objectToMap_inOrder_withoutFields(O o, Collection withoutFields) { if (o == null) null; if (o instanceof Map) ret (Map) o; new LinkedHashMap map; for (S field : listWithoutSet(fieldsInOrder(o), withoutFields)) map.put(field, get(o, field)); ret map; }