OCLOperators insertAt
No edit summary
No edit summary
Line 6: Line 6:
* Note that the position in 1-based, not 0.
* Note that the position in 1-based, not 0.
See also: [[Association]]
See also: [[Association]]
[[Category:OCLOperators]]

Revision as of 12:41, 7 December 2022

This page was created by Lars.olofsson@mdriven.net on 2022-07-30. Last edited by Stephanie@mdriven.net on 2025-02-10.

Insert an object in a specific place in a collection or association. <collection>.insertAt(<position>, <object>) Used when you don't want a new object at the end using add.

For associations, it's only makes sense to use insertAt on ordered associations.

  • Note that the position in 1-based, not 0.

See also: Association