gradle
8.5

# whenObjectRemoved

abstract fun whenObjectRemoved(action: Action<out Any>): Action<out Any>(source)

Adds an `Action` to be executed when an object is removed from this collection.

#### Return

the supplied action

#### Parameters

action

The action to be executed

abstract fun whenObjectRemoved(action: Closure)(source)

Adds a closure to be called when an object is removed from this collection. The removed object is passed to the closure as the parameter.

#### Parameters

action

The closure to be called