File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/main/java/io/reactivex/disposables Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,12 @@ public boolean isDisposed() {
85
85
return disposed ;
86
86
}
87
87
88
+ /**
89
+ * Adds a disposable to this container or disposes it if the
90
+ * container has been disposed.
91
+ * @param d the disposable to add, not null
92
+ * @return true if successful, false if this container has been disposed
93
+ */
88
94
@ Override
89
95
public boolean add (@ NonNull Disposable d ) {
90
96
ObjectHelper .requireNonNull (d , "d is null" );
@@ -135,6 +141,12 @@ public boolean addAll(@NonNull Disposable... ds) {
135
141
return false ;
136
142
}
137
143
144
+ /**
145
+ * Removes and disposes the given disposable if it is part of this
146
+ * container.
147
+ * @param d the disposable to remove and dispose, not null
148
+ * @return true if the operation was successful
149
+ */
138
150
@ Override
139
151
public boolean remove (@ NonNull Disposable d ) {
140
152
if (delete (d )) {
@@ -144,6 +156,12 @@ public boolean remove(@NonNull Disposable d) {
144
156
return false ;
145
157
}
146
158
159
+ /**
160
+ * Removes (but does not dispose) the given disposable if it is part of this
161
+ * container.
162
+ * @param d the disposable to remove, not null
163
+ * @return true if the operation was successful
164
+ */
147
165
@ Override
148
166
public boolean delete (@ NonNull Disposable d ) {
149
167
ObjectHelper .requireNonNull (d , "Disposable item is null" );
You can’t perform that action at this time.
0 commit comments