setFieldValue method
Set a field's value by fieldId
. Primitive types must be "boxed" in the
appropriate object wrapper type.
Implementation
setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case ROWS:
if (value == null) {
unsetRows();
} else {
this.rows = value as int;
}
break;
case EXEC_DURATION_IN_US:
if (value == null) {
unsetExec_duration_in_us();
} else {
this.exec_duration_in_us = value as int;
}
break;
case TOTAL_DURATION_IN_US:
if (value == null) {
unsetTotal_duration_in_us();
} else {
this.total_duration_in_us = value as int;
}
break;
case OTHER_STATS:
if (value == null) {
unsetOther_stats();
} else {
this.other_stats = value as Map<Int8List, Int8List>;
}
break;
default:
throw new ArgumentError("Field $fieldID doesn't exist!");
}
}