static A resetFields(A object, S fields) {
if (object != null) {
O emptyInstance = newInstance(object.getClass());
resetFields(object, fields, emptyInstance);
}
ret object;
}
static A resetFields(A object, S fields, O emptyInstance) {
for (S field : identifiers(fields))
setOpt(object, field, getOpt(emptyInstance, field));
ret object;
}