Class SingleSubjectAdapter<T>
- java.lang.Object
-
- org.saynotobugs.confidence.rxjava3.adapters.SingleSubjectAdapter<T>
-
- All Implemented Interfaces:
RxSubjectAdapter<T>
public final class SingleSubjectAdapter<T> extends java.lang.Object implements RxSubjectAdapter<T>
AnRxSubjectAdapterto aSingleSubject. Calls toonNext(Object)are delegated toSingleSubject.onSuccess(Object), which automatically "completes" the subject. On the other hand,SingleSubjects can not complete without a value, so calls toonComplete()throw anUnsupportedOperationException.
-
-
Constructor Summary
Constructors Constructor Description SingleSubjectAdapter(io.reactivex.rxjava3.subjects.SingleSubject<? super T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonComplete()voidonError(java.lang.Throwable error)voidonNext(T next)
-
-
-
Constructor Detail
-
SingleSubjectAdapter
public SingleSubjectAdapter(io.reactivex.rxjava3.subjects.SingleSubject<? super T> delegate)
-
-
Method Detail
-
onNext
public void onNext(T next)
- Specified by:
onNextin interfaceRxSubjectAdapter<T>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceRxSubjectAdapter<T>
-
onError
public void onError(java.lang.Throwable error)
- Specified by:
onErrorin interfaceRxSubjectAdapter<T>
-
-