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 TAG_VERTICES:
if (value == null) {
unsetTag_vertices();
} else {
this.tag_vertices = value as Map<Int8List, int>;
}
break;
case EDGES:
if (value == null) {
unsetEdges();
} else {
this.edges = value as Map<Int8List, int>;
}
break;
case SPACE_VERTICES:
if (value == null) {
unsetSpace_vertices();
} else {
this.space_vertices = value as int;
}
break;
case SPACE_EDGES:
if (value == null) {
unsetSpace_edges();
} else {
this.space_edges = value as int;
}
break;
case POSITIVE_PART_CORRELATIVITY:
if (value == null) {
unsetPositive_part_correlativity();
} else {
this.positive_part_correlativity =
value as Map<int, List<Correlativity>>;
}
break;
case NEGATIVE_PART_CORRELATIVITY:
if (value == null) {
unsetNegative_part_correlativity();
} else {
this.negative_part_correlativity =
value as Map<int, List<Correlativity>>;
}
break;
case STATUS:
if (value == null) {
unsetStatus();
} else {
this.status = value as int;
}
break;
default:
throw new ArgumentError("Field $fieldID doesn't exist!");
}
}