Interface SingleSource<T>
- Type Parameters:
T- the element type
- All Known Implementing Classes:
Single, SingleSubject
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a basic
Single source base interface,
consumable via an SingleObserver.
This class also serves the base type for custom operators wrapped into
Single via Single.create(SingleOnSubscribe).
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidsubscribe(@NonNull SingleObserver<? super @NonNull T> observer) Subscribes the givenSingleObserverto thisSingleSourceinstance.
-
Method Details
-
subscribe
Subscribes the givenSingleObserverto thisSingleSourceinstance.- Parameters:
observer- theSingleObserver, notnull- Throws:
NullPointerException- ifobserverisnull
-