Top Constructors Methods
reactor.core.scheduler

pack-priv final Class EmptyCompositeDisposable

extends Object
implements Composite
Class Inheritance
All Implemented Interfaces
reactor.core.Disposable.Composite, reactor.core.Disposable
Imports
reactor.core.Disposable, java.util.Collection

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
add(Disposable
the Disposable to add.
d
)

Implements reactor.core.Disposable.Composite.add.

Add a Disposable to this container, if it is not disposed.
public boolean
addAll(Collection<? extends Disposable>
the collection of Disposables
ds
)

Overrides default reactor.core.Disposable.Composite.addAll.

Adds the given collection of Disposables to the container or disposes them all if the container has been disposed.
public void
dispose()

Implements reactor.core.Disposable.Composite.dispose.

Atomically mark the container as disposed, clear it and then dispose all the previously contained Disposables.
public boolean
isDisposed()

Implements reactor.core.Disposable.Composite.isDisposed.

Indicates if the container has already been disposed.
public boolean
remove(Disposable
the Disposable to remove.
d
)

Implements reactor.core.Disposable.Composite.remove.

Delete the Disposable from this container, without disposing it.
public int
size()

Implements reactor.core.Disposable.Composite.size.

Returns the number of currently held Disposables.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EmptyCompositeDisposableback to summary
pack-priv EmptyCompositeDisposable()

Method Detail

addback to summary
public boolean add(Disposable d)

Implements reactor.core.Disposable.Composite.add.

Doc from reactor.core.Disposable.Composite.add.

Add a Disposable to this container, if it is not disposed. Otherwise d is disposed immediately.

Parameters
d:Disposable

the Disposable to add.

Returns:boolean

true if the disposable could be added, false otherwise.

Annotations
@Override
addAllback to summary
public boolean addAll(Collection<? extends Disposable> ds)

Overrides default reactor.core.Disposable.Composite.addAll.

Doc from reactor.core.Disposable.Composite.addAll.

Adds the given collection of Disposables to the container or disposes them all if the container has been disposed.

Parameters
ds:Collection<? extends Disposable>

the collection of Disposables

Returns:boolean

true if the operation was successful, false if the container has been disposed

Annotations
@Override
disposeback to summary
public void dispose()

Implements reactor.core.Disposable.Composite.dispose.

Doc from reactor.core.Disposable.Composite.dispose.

Atomically mark the container as disposed, clear it and then dispose all the previously contained Disposables. From there on the container cannot be reused, as add(Disposable) and addAll(Collection) methods will immediately return false.

Annotations
@Override
isDisposedback to summary
public boolean isDisposed()

Implements reactor.core.Disposable.Composite.isDisposed.

Doc from reactor.core.Disposable.Composite.isDisposed.

Indicates if the container has already been disposed.

Note that if that is the case, attempts to add new disposable to it via add(Disposable) and addAll(Collection) will be rejected.

Returns:boolean

true if the container has been disposed, false otherwise.

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

Implements reactor.core.Disposable.Composite.remove.

Doc from reactor.core.Disposable.Composite.remove.

Delete the Disposable from this container, without disposing it.

It becomes the responsibility of the caller to dispose the value themselves, which they can do by a simple call to Disposable#dispose() on said value (probably guarded by a check that this method returned true, meaning the disposable was actually in the container).

Parameters
d:Disposable

the Disposable to remove.

Returns:boolean

true if the disposable was successfully deleted, false otherwise.

Annotations
@Override
sizeback to summary
public int size()

Implements reactor.core.Disposable.Composite.size.

Doc from reactor.core.Disposable.Composite.size.

Returns the number of currently held Disposables.

Returns:int

the number of currently held Disposables

Annotations
@Override