Top Description Fields Constructors Methods
io.reactivex.rxjava3.internal.disposables

public final Class ListCompositeDisposable

extends Object
implements Disposable, DisposableContainer
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.disposables.DisposableContainer, io.reactivex.rxjava3.disposables.Disposable
Imports
java.util.*, io.reactivex.rxjava3.disposables.*, io.reactivex.rxjava3.exceptions.*, io.reactivex.rxjava3.internal.util.ExceptionHelper

A disposable container that can hold onto multiple other disposables.

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv List<Disposable>

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
add(Disposable
the disposable to add, not null
d
)

Implements io.reactivex.rxjava3.disposables.DisposableContainer.add.

Adds a disposable to this container or disposes it if the container has been disposed.
public boolean
public void
public boolean
delete(Disposable
the disposable to remove, not null
d
)

Implements io.reactivex.rxjava3.disposables.DisposableContainer.delete.

Removes but does not dispose the given disposable if it is part of this container.
public void
dispose()

Implements io.reactivex.rxjava3.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
pack-priv void
public boolean
isDisposed()

Implements io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.
public boolean
remove(Disposable
the disposable to remove and dispose, not null
d
)

Implements io.reactivex.rxjava3.disposables.DisposableContainer.remove.

Removes and disposes the given disposable if it is part of this container.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

disposedback to summary
pack-priv volatile boolean disposed
resourcesback to summary
pack-priv List<Disposable> resources

Constructor Detail

ListCompositeDisposableback to summary
public ListCompositeDisposable()
ListCompositeDisposableback to summary
public ListCompositeDisposable(Disposable... resources)
ListCompositeDisposableback to summary
public ListCompositeDisposable(Iterable<? extends Disposable> resources)

Method Detail

addback to summary
public boolean add(Disposable d)

Implements io.reactivex.rxjava3.disposables.DisposableContainer.add.

Doc from io.reactivex.rxjava3.disposables.DisposableContainer.add.

Adds a disposable to this container or disposes it if the container has been disposed.

Parameters
d:Disposable

the disposable to add, not null

Returns:boolean

true if successful, false if this container has been disposed

Annotations
@Override
addAllback to summary
public boolean addAll(Disposable... ds)
clearback to summary
public void clear()
deleteback to summary
public boolean delete(Disposable d)

Implements io.reactivex.rxjava3.disposables.DisposableContainer.delete.

Doc from io.reactivex.rxjava3.disposables.DisposableContainer.delete.

Removes but does not dispose the given disposable if it is part of this container.

Parameters
d:Disposable

the disposable to remove, not null

Returns:boolean

true if the operation was successful

Annotations
@Override
disposeback to summary
public void dispose()

Implements io.reactivex.rxjava3.disposables.Disposable.dispose.

Doc from io.reactivex.rxjava3.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.

Annotations
@Override
disposeback to summary
pack-priv void dispose(List<Disposable> set)
isDisposedback to summary
public boolean isDisposed()

Implements io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Doc from io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.

Returns:boolean

true if this resource has been disposed

Annotations
@Override
removeback to summary
public boolean remove(Disposable d)

Implements io.reactivex.rxjava3.disposables.DisposableContainer.remove.

Doc from io.reactivex.rxjava3.disposables.DisposableContainer.remove.

Removes and disposes the given disposable if it is part of this container.

Parameters
d:Disposable

the disposable to remove and dispose, not null

Returns:boolean

true if the operation was successful

Annotations
@Override