@Test public void innerDisposed() { BehaviorSubject.create() .subscribe(new Observer<Object>() { @Override public void onSubscribe(Disposable d) { assertFalse(d.isDisposed()); d.dispose(); assertTrue(d.isDisposed()); } @Override public void onNext(Object value) { } @Override public void onError(Throwable e) { } @Override public void onComplete() { } }); }
@CheckReturnValue @NonNull public static <T> BehaviorSubject<T> create() { return new BehaviorSubject<T>(); }
BehaviorSubject extends Subject<T> { @CheckReturnValue @NonNull public static <T> BehaviorSubject<T> create() { return new BehaviorSubject<T>(); } }
BehaviorSubject extends Subject<T> { @CheckReturnValue @NonNull public static <T> BehaviorSubject<T> create() { return new BehaviorSubject<T>(); } @SuppressWarnings("unchecked")  BehaviorSubject();   BehaviorSubject(T defaultValue); }
BehaviorSubject extends Subject<T> { @CheckReturnValue @NonNull public static <T> BehaviorSubject<T> create() { return new BehaviorSubject<T>(); } @SuppressWarnings("unchecked")  BehaviorSubject();   BehaviorSubject(T defaultValue); @CheckReturnValue @NonNull static BehaviorSubject<T> create(); @CheckReturnValue @NonNull static BehaviorSubject<T> createDefault(T defaultValue); @Override void onSubscribe(Disposable s); @Override void onNext(T t); @Override void onError(Throwable t); @Override void onComplete(); @Override boolean hasObservers(); @Override @Nullable Throwable getThrowable(); @Nullable T getValue(); Object[] getValues(); @SuppressWarnings("unchecked") T[] getValues(T[] array); @Override boolean hasComplete(); @Override boolean hasThrowable(); boolean hasValue(); }
BehaviorSubject extends Subject<T> { @CheckReturnValue @NonNull public static <T> BehaviorSubject<T> create() { return new BehaviorSubject<T>(); } @SuppressWarnings("unchecked")  BehaviorSubject();   BehaviorSubject(T defaultValue); @CheckReturnValue @NonNull static BehaviorSubject<T> create(); @CheckReturnValue @NonNull static BehaviorSubject<T> createDefault(T defaultValue); @Override void onSubscribe(Disposable s); @Override void onNext(T t); @Override void onError(Throwable t); @Override void onComplete(); @Override boolean hasObservers(); @Override @Nullable Throwable getThrowable(); @Nullable T getValue(); Object[] getValues(); @SuppressWarnings("unchecked") T[] getValues(T[] array); @Override boolean hasComplete(); @Override boolean hasThrowable(); boolean hasValue();  }