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 KEY:
if (value == null) {
unsetKey();
} else {
this.key = value as EdgeKey;
}
break;
case PROPS:
if (value == null) {
unsetProps();
} else {
this.props = value as List<t_nebula.Value>;
}
break;
default:
throw new ArgumentError("Field $fieldID doesn't exist!");
}
}