Package io.reactivex.rxjava3.disposables
Interface DisposableContainer
- All Known Implementing Classes:
CompositeDisposable
,ListCompositeDisposable
public interface DisposableContainer
Common interface to add and remove disposables from a container.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(Disposable d) Adds a disposable to this container or disposes it if the container has been disposed.boolean
delete
(Disposable d) Removes but does not dispose the given disposable if it is part of this container.boolean
remove
(Disposable d) Removes and disposes the given disposable if it is part of this container.
-
Method Details
-
add
Adds a disposable to this container or disposes it if the container has been disposed.- Parameters:
d
- the disposable to add, not null- Returns:
- true if successful, false if this container has been disposed
-
remove
Removes and disposes the given disposable if it is part of this container.- Parameters:
d
- the disposable to remove and dispose, not null- Returns:
- true if the operation was successful
-
delete
Removes but does not dispose the given disposable if it is part of this container.- Parameters:
d
- the disposable to remove, not null- Returns:
- true if the operation was successful
-