You can use the following API to specify a structural feature value:

void setValue(StructuredValue object, String featureName, Object value)

The following example shows how to specify the value of the structural feature in ALH API:

value = ALH.setValue(object, "speed", "10");

If the value of an object or a featureName is null, an IllegalArgumentException will be thrown. However, null is acceptable for an assigned value.


In addition, the RuntimeObject can be omitted. The following example shows how to set a structural feature value without specifying a RuntimeObject in ALH API:

void setValue(String featureName, Object value)

Information

Alternatively, you can use ALH API through the fUML object syntax, with object.set(featureName, value). For example:

  • value = object.set("speed", "10");