@Test public void disposeTwice() { CompletableSubject.create() .subscribe(new CompletableObserver() { @Override public void onSubscribe(Disposable d) { assertFalse(d.isDisposed()); d.dispose(); d.dispose(); assertTrue(d.isDisposed()); } @Override public void onError(Throwable e) { } @Override public void onComplete() { } }); }
@CheckReturnValue @NonNull public static CompletableSubject create() { return new CompletableSubject(); }
CompletableSubject extends Completable implements CompletableObserver { @CheckReturnValue @NonNull public static CompletableSubject create() { return new CompletableSubject(); } }
CompletableSubject extends Completable implements CompletableObserver { @CheckReturnValue @NonNull public static CompletableSubject create() { return new CompletableSubject(); } CompletableSubject(); }
CompletableSubject extends Completable implements CompletableObserver { @CheckReturnValue @NonNull public static CompletableSubject create() { return new CompletableSubject(); } CompletableSubject(); @CheckReturnValue @NonNull static CompletableSubject create(); @Override void onSubscribe(Disposable d); @Override void onError(Throwable e); @Override void onComplete(); @Nullable Throwable getThrowable(); boolean hasThrowable(); boolean hasComplete(); boolean hasObservers(); }
CompletableSubject extends Completable implements CompletableObserver { @CheckReturnValue @NonNull public static CompletableSubject create() { return new CompletableSubject(); } CompletableSubject(); @CheckReturnValue @NonNull static CompletableSubject create(); @Override void onSubscribe(Disposable d); @Override void onError(Throwable e); @Override void onComplete(); @Nullable Throwable getThrowable(); boolean hasThrowable(); boolean hasComplete(); boolean hasObservers();  }