Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: Inline CompositeDisposable JavaDoc #6031

Merged
merged 1 commit into from
Jun 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/main/java/io/reactivex/disposables/CompositeDisposable.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ public boolean isDisposed() {
return disposed;
}

/**
* Adds a disposable to this container or disposes it if the
* container has been disposed.
* @param d the disposable to add, not null
* @return true if successful, false if this container has been disposed
*/
@Override
public boolean add(@NonNull Disposable d) {
ObjectHelper.requireNonNull(d, "d is null");
Expand Down Expand Up @@ -135,6 +141,12 @@ public boolean addAll(@NonNull Disposable... ds) {
return false;
}

/**
* Removes and disposes the given disposable if it is part of this
* container.
* @param d the disposable to remove and dispose, not null
* @return true if the operation was successful
*/
@Override
public boolean remove(@NonNull Disposable d) {
if (delete(d)) {
Expand All @@ -144,6 +156,12 @@ public boolean remove(@NonNull Disposable d) {
return false;
}

/**
* Removes (but does not dispose) the given disposable if it is part of this
* container.
* @param d the disposable to remove, not null
* @return true if the operation was successful
*/
@Override
public boolean delete(@NonNull Disposable d) {
ObjectHelper.requireNonNull(d, "Disposable item is null");
Expand Down