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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
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 Detail
-
add
boolean add(Disposable d)
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
boolean remove(Disposable d)
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
boolean delete(Disposable d)
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
-
-