Product SiteDocumentation Site

5.3.4.7. insert


>>-insert(item-+--------+-)------------------------------------><
               +-,index-+

Returns a collection-supplied index for item item, which is added to the collection. The inserted item follows an existing item with index index in the collection ordering. If index is the Nil object, item becomes the first item in the ordered collection. If you omit index, the item becomes the last item in the collection.
Inserting an item in the collection at position index will cause the items in the collection after position index to have their relative positions shifted by the collection object. Depending on the nature of the collection, the index values for any items already in the collection may be modified by the insertion.
This is an abstract method that must be implemented by a subclass of this class.