Previous: , Up: OrderedCollection   [Index]


1.126.6 OrderedCollection: removing

identityRemove: oldObject

Remove oldObject from the receiver. If absent, fail, else answer oldObject.

identityRemove: anObject ifAbsent: aBlock

Remove anObject from the receiver. If it can’t be found, answer the result of evaluating aBlock

remove: anObject ifAbsent: aBlock

Remove anObject from the receiver. If it can’t be found, answer the result of evaluating aBlock

removeAtIndex: anIndex

Remove the object at index anIndex from the receiver. Fail if the index is out of bounds.

removeFirst

Remove an object from the start of the receiver. Fail if the receiver is empty

removeLast

Remove an object from the end of the receiver. Fail if the receiver is empty