Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can use ALH API to remove a value from an object. For example, you can set a designated object, a feature of the designated object from which a value will be removed, a value via object, a featureName, and a value parameter respectively.

You can remove an object's value by executing the following code fragment
 

Code Block
languagetext
public boolean removeValue(StructuredValue object, String featureName, Value value) {
...
}

 

If you want to remove more than one value from an object, e.g., the value of the upper bound of the multiplicity is more than one, you can remove them by using the parameter removeAt.
 

Code Block
languagetext
public boolean removeValueAt(StructuredValue object, String featureName, Integer removeAt) {
...
}



The following code fragment shows how to remove values from an object, e.g., System.p1, through ALH API.

Code Block
languagetext
print(System);							// System.p1 = [10, 20, 30]
ALH.removeValueAt(System,”p1”,3);       // System.p1 = [10, 20]
ALH.removeValue(System,”p1”,20);        // System.p1 = [10]