Next: , Previous: , Up: Collection   [Index]


1.37.12 Collection: removing

empty

Remove everything from the receiver.

remove: oldObject

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

remove: oldObject ifAbsent: anExceptionBlock

Remove oldObject from the receiver. If absent, evaluate anExceptionBlock and answer the result, else answer oldObject.

removeAll: aCollection

Remove each object in aCollection, answer aCollection, fail if some of them is absent. Warning: this could leave the collection in a semi-updated state.

removeAll: aCollection ifAbsent: aBlock

Remove each object in aCollection, answer aCollection; if some element is absent, pass it to aBlock.

removeAllSuchThat: aBlock

Remove from the receiver all objects for which aBlock returns true.