Top Description Methods
io.reactivex.rxjava3.disposables

public Interface DisposableContainer

Known Direct Implementers
io.reactivex.rxjava3.internal.disposables.ListCompositeDisposable, io.reactivex.rxjava3.disposables.CompositeDisposable

Common interface to add and remove disposables from a container.
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if successful, false if this container has been disposed
add
(Disposable
the disposable to add, not null
d
)

Adds a disposable to this container or disposes it if the container has been disposed.

public boolean

Returns:

true if the operation was successful
delete
(Disposable
the disposable to remove, not null
d
)

Removes but does not dispose the given disposable if it is part of this container.

public boolean

Returns:

true if the operation was successful
remove
(Disposable
the disposable to remove and dispose, not null
d
)

Removes and disposes the given disposable if it is part of this container.

Method Detail

addback to summary
public boolean add(Disposable d)

Adds a disposable to this container or disposes it if the container has been disposed.

Parameters
d:Disposable

the disposable to add, not null

Returns:boolean

true if successful, false if this container has been disposed

deleteback to summary
public boolean delete(Disposable d)

Removes but does not dispose the given disposable if it is part of this container.

Parameters
d:Disposable

the disposable to remove, not null

Returns:boolean

true if the operation was successful

removeback to summary
public boolean remove(Disposable d)

Removes and disposes the given disposable if it is part of this container.

Parameters
d:Disposable

the disposable to remove and dispose, not null

Returns:boolean

true if the operation was successful