Top Description Methods
io.reactivex.rxjava3.operators

public Interface ScalarSupplier<T>

extends Supplier<T>
Known Direct Implementers
io.reactivex.rxjava3.internal.operators.flowable.FlowableJust, io.reactivex.rxjava3.internal.operators.flowable.FlowableEmpty, io.reactivex.rxjava3.internal.operators.maybe.MaybeJust, io.reactivex.rxjava3.internal.operators.maybe.MaybeEmpty, io.reactivex.rxjava3.internal.operators.observable.ObservableEmpty, io.reactivex.rxjava3.internal.operators.observable.ObservableJust
Annotations
@FunctionalInterface
Type Parameters
<T>
the scalar value type held by the implementing reactive type
Imports
io.reactivex.rxjava3.annotations.NonNull, io.reactivex.rxjava3.functions.Supplier

A marker interface indicating that a scalar, constant value is held by the implementing reactive type which can be safely extracted during assembly time can be used for optimization.

Implementors of get() should not throw any exception.

Design Note

the interface extends Supplier because if a scalar is safe to extract during assembly time, it is also safe to extract at subscription time or later. This allows optimizations to deal with such single-element sources uniformly.

Since
3.1.1

Method Summary

Modifier and TypeMethod and Description
public T
get()

Redeclares io.reactivex.rxjava3.functions.Supplier.get.

Produces a value or throws an exception.

Method Detail

getback to summary
public T get()

Redeclares io.reactivex.rxjava3.functions.Supplier.get.

Doc from io.reactivex.rxjava3.functions.Supplier.get.

Produces a value or throws an exception.

Returns:T

the value produced

Annotations
@Override