Skip to content

Commit

Permalink
2.x: Inline CompositeDisposable JavaDoc (#6031)
Browse files Browse the repository at this point in the history
  • Loading branch information
akarnokd authored Jun 1, 2018
1 parent 6038c02 commit 09695b4
Showing 1 changed file with 18 additions and 0 deletions.
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

0 comments on commit 09695b4

Please sign in to comment.