├── .gitattributes ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── gradle-wrapper-validation.yml │ ├── gradle_branch.yml │ ├── gradle_jdk11.yml │ ├── gradle_pr.yml │ ├── gradle_release.yml │ ├── gradle_snapshot.yml │ └── scorecard.yml ├── .gitignore ├── .gitpod.yml ├── CONTRIBUTING.md ├── COPYRIGHT ├── DESIGN.md ├── LICENSE ├── README.md ├── SECURITY.md ├── build.gradle ├── codecov.yml ├── config ├── checkstyle │ ├── checkstyle.xml │ └── suppressions.xml └── license │ ├── HEADER │ └── HEADER_JAVA ├── docs ├── Additional-Reading.md ├── Alphabetical-List-of-Observable-Operators.md ├── Async-Operators.md ├── Backpressure-(2.0).md ├── Backpressure.md ├── Blocking-Observable-Operators.md ├── Combining-Observables.md ├── Conditional-and-Boolean-Operators.md ├── Connectable-Observable-Operators.md ├── Creating-Observables.md ├── Error-Handling-Operators.md ├── Error-Handling.md ├── Filtering-Observables.md ├── Getting-Started.md ├── Home.md ├── How-To-Use-RxJava.md ├── How-to-Contribute.md ├── Implementing-Your-Own-Operators.md ├── Implementing-custom-operators-(draft).md ├── Mathematical-and-Aggregate-Operators.md ├── Observable-Utility-Operators.md ├── Observable.md ├── Operator-Matrix.md ├── Parallel-flows.md ├── Phantom-Operators.md ├── Plugins.md ├── Problem-Solving-Examples-in-RxJava.md ├── README.md ├── Reactive-Streams.md ├── Scheduler.md ├── String-Observables.md ├── Subject.md ├── The-RxJava-Android-Module.md ├── Transforming-Observables.md ├── What's-different-in-2.0.md ├── What's-different-in-3.0.md ├── Writing-operators-for-2.0.md ├── _Footer.md ├── _Sidebar.md └── _Sidebar.md.md ├── gradle.properties ├── gradle ├── javadoc_cleanup.gradle ├── stylesheet.css └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── pmd.xml ├── push_javadoc.sh ├── settings.gradle └── src ├── jmh └── java │ └── io │ └── reactivex │ └── rxjava3 │ ├── core │ ├── BinaryFlatMapPerf.java │ ├── BlockingGetPerf.java │ ├── BlockingPerf.java │ ├── CallableAsyncPerf.java │ ├── EachTypeFlatMapPerf.java │ ├── FlatMapJustPerf.java │ ├── FlattenCrossMapPerf.java │ ├── FlattenJustPerf.java │ ├── FlattenRangePerf.java │ ├── FlowableFlatMapCompletableAsyncPerf.java │ ├── FlowableFlatMapCompletableSyncPerf.java │ ├── InputWithIncrementingInteger.java │ ├── JustAsyncPerf.java │ ├── LatchedSingleObserver.java │ ├── MemoryPerf.java │ ├── ObservableFlatMapPerf.java │ ├── OperatorFlatMapPerf.java │ ├── OperatorMergePerf.java │ ├── PerfAsyncConsumer.java │ ├── PerfBoundedSubscriber.java │ ├── PerfConsumer.java │ ├── PerfInteropConsumer.java │ ├── PerfObserver.java │ ├── PerfSubscriber.java │ ├── PublishProcessorPerf.java │ ├── RangePerf.java │ ├── ReducePerf.java │ ├── RxVsStreamPerf.java │ ├── StrictPerf.java │ ├── TakeUntilPerf.java │ ├── ToFlowablePerf.java │ └── XMapYPerf.java │ ├── parallel │ └── ParallelPerf.java │ └── xmapz │ ├── FlowableConcatMapCompletablePerf.java │ ├── FlowableConcatMapMaybeEmptyPerf.java │ ├── FlowableConcatMapMaybePerf.java │ ├── FlowableConcatMapSinglePerf.java │ ├── FlowableFlatMapCompletablePerf.java │ ├── FlowableFlatMapMaybeEmptyPerf.java │ ├── FlowableFlatMapMaybePerf.java │ ├── FlowableFlatMapSinglePerf.java │ ├── FlowableSwitchMapCompletablePerf.java │ ├── FlowableSwitchMapMaybeEmptyPerf.java │ ├── FlowableSwitchMapMaybePerf.java │ ├── FlowableSwitchMapSinglePerf.java │ ├── ObservableConcatMapCompletablePerf.java │ ├── ObservableConcatMapMaybeEmptyPerf.java │ ├── ObservableConcatMapMaybePerf.java │ ├── ObservableConcatMapSinglePerf.java │ ├── ObservableFlatMapCompletablePerf.java │ ├── ObservableFlatMapMaybeEmptyPerf.java │ ├── ObservableFlatMapMaybePerf.java │ ├── ObservableFlatMapSinglePerf.java │ ├── ObservableSwitchMapCompletablePerf.java │ ├── ObservableSwitchMapMaybeEmptyPerf.java │ ├── ObservableSwitchMapMaybePerf.java │ └── ObservableSwitchMapSinglePerf.java ├── main ├── java │ └── io │ │ └── reactivex │ │ └── rxjava3 │ │ ├── annotations │ │ ├── BackpressureKind.java │ │ ├── BackpressureSupport.java │ │ ├── Beta.java │ │ ├── CheckReturnValue.java │ │ ├── Experimental.java │ │ ├── NonNull.java │ │ ├── Nullable.java │ │ ├── SchedulerSupport.java │ │ └── package-info.java │ │ ├── core │ │ ├── BackpressureOverflowStrategy.java │ │ ├── BackpressureStrategy.java │ │ ├── Completable.java │ │ ├── CompletableConverter.java │ │ ├── CompletableEmitter.java │ │ ├── CompletableObserver.java │ │ ├── CompletableOnSubscribe.java │ │ ├── CompletableOperator.java │ │ ├── CompletableSource.java │ │ ├── CompletableTransformer.java │ │ ├── Emitter.java │ │ ├── Flowable.java │ │ ├── FlowableConverter.java │ │ ├── FlowableEmitter.java │ │ ├── FlowableOnSubscribe.java │ │ ├── FlowableOperator.java │ │ ├── FlowableSubscriber.java │ │ ├── FlowableTransformer.java │ │ ├── Maybe.java │ │ ├── MaybeConverter.java │ │ ├── MaybeEmitter.java │ │ ├── MaybeObserver.java │ │ ├── MaybeOnSubscribe.java │ │ ├── MaybeOperator.java │ │ ├── MaybeSource.java │ │ ├── MaybeTransformer.java │ │ ├── Notification.java │ │ ├── Observable.java │ │ ├── ObservableConverter.java │ │ ├── ObservableEmitter.java │ │ ├── ObservableOnSubscribe.java │ │ ├── ObservableOperator.java │ │ ├── ObservableSource.java │ │ ├── ObservableTransformer.java │ │ ├── Observer.java │ │ ├── Scheduler.java │ │ ├── Single.java │ │ ├── SingleConverter.java │ │ ├── SingleEmitter.java │ │ ├── SingleObserver.java │ │ ├── SingleOnSubscribe.java │ │ ├── SingleOperator.java │ │ ├── SingleSource.java │ │ ├── SingleTransformer.java │ │ └── package-info.java │ │ ├── disposables │ │ ├── ActionDisposable.java │ │ ├── AutoCloseableDisposable.java │ │ ├── CompositeDisposable.java │ │ ├── Disposable.java │ │ ├── DisposableContainer.java │ │ ├── FutureDisposable.java │ │ ├── ReferenceDisposable.java │ │ ├── RunnableDisposable.java │ │ ├── SerialDisposable.java │ │ ├── SubscriptionDisposable.java │ │ └── package-info.java │ │ ├── exceptions │ │ ├── CompositeException.java │ │ ├── Exceptions.java │ │ ├── MissingBackpressureException.java │ │ ├── OnErrorNotImplementedException.java │ │ ├── ProtocolViolationException.java │ │ ├── QueueOverflowException.java │ │ ├── UndeliverableException.java │ │ └── package-info.java │ │ ├── flowables │ │ ├── ConnectableFlowable.java │ │ ├── GroupedFlowable.java │ │ └── package-info.java │ │ ├── functions │ │ ├── Action.java │ │ ├── BiConsumer.java │ │ ├── BiFunction.java │ │ ├── BiPredicate.java │ │ ├── BooleanSupplier.java │ │ ├── Cancellable.java │ │ ├── Consumer.java │ │ ├── Function.java │ │ ├── Function3.java │ │ ├── Function4.java │ │ ├── Function5.java │ │ ├── Function6.java │ │ ├── Function7.java │ │ ├── Function8.java │ │ ├── Function9.java │ │ ├── IntFunction.java │ │ ├── LongConsumer.java │ │ ├── Predicate.java │ │ ├── Supplier.java │ │ └── package-info.java │ │ ├── internal │ │ ├── disposables │ │ │ ├── ArrayCompositeDisposable.java │ │ │ ├── CancellableDisposable.java │ │ │ ├── DisposableHelper.java │ │ │ ├── EmptyDisposable.java │ │ │ ├── ListCompositeDisposable.java │ │ │ └── SequentialDisposable.java │ │ ├── functions │ │ │ ├── Functions.java │ │ │ └── ObjectHelper.java │ │ ├── fuseable │ │ │ ├── AbstractEmptyQueueFuseable.java │ │ │ ├── CancellableQueueFuseable.java │ │ │ ├── FuseToFlowable.java │ │ │ ├── FuseToMaybe.java │ │ │ ├── FuseToObservable.java │ │ │ ├── HasUpstreamCompletableSource.java │ │ │ ├── HasUpstreamMaybeSource.java │ │ │ ├── HasUpstreamObservableSource.java │ │ │ ├── HasUpstreamPublisher.java │ │ │ ├── HasUpstreamSingleSource.java │ │ │ └── package-info.java │ │ ├── jdk8 │ │ │ ├── CompletableFromCompletionStage.java │ │ │ ├── CompletionStageConsumer.java │ │ │ ├── FlowableCollectWithCollector.java │ │ │ ├── FlowableCollectWithCollectorSingle.java │ │ │ ├── FlowableFirstStageSubscriber.java │ │ │ ├── FlowableFlatMapStream.java │ │ │ ├── FlowableFromCompletionStage.java │ │ │ ├── FlowableFromStream.java │ │ │ ├── FlowableLastStageSubscriber.java │ │ │ ├── FlowableMapOptional.java │ │ │ ├── FlowableSingleStageSubscriber.java │ │ │ ├── FlowableStageSubscriber.java │ │ │ ├── MaybeFlattenStreamAsFlowable.java │ │ │ ├── MaybeFlattenStreamAsObservable.java │ │ │ ├── MaybeFromCompletionStage.java │ │ │ ├── MaybeMapOptional.java │ │ │ ├── ObservableCollectWithCollector.java │ │ │ ├── ObservableCollectWithCollectorSingle.java │ │ │ ├── ObservableFirstStageObserver.java │ │ │ ├── ObservableFlatMapStream.java │ │ │ ├── ObservableFromCompletionStage.java │ │ │ ├── ObservableFromStream.java │ │ │ ├── ObservableLastStageObserver.java │ │ │ ├── ObservableMapOptional.java │ │ │ ├── ObservableSingleStageObserver.java │ │ │ ├── ObservableStageObserver.java │ │ │ ├── ParallelCollector.java │ │ │ ├── ParallelFlatMapStream.java │ │ │ ├── ParallelMapOptional.java │ │ │ ├── ParallelMapTryOptional.java │ │ │ ├── SingleFlattenStreamAsFlowable.java │ │ │ ├── SingleFlattenStreamAsObservable.java │ │ │ ├── SingleFromCompletionStage.java │ │ │ └── SingleMapOptional.java │ │ ├── observers │ │ │ ├── AbstractDisposableAutoRelease.java │ │ │ ├── BasicFuseableObserver.java │ │ │ ├── BasicIntQueueDisposable.java │ │ │ ├── BasicQueueDisposable.java │ │ │ ├── BiConsumerSingleObserver.java │ │ │ ├── BlockingBaseObserver.java │ │ │ ├── BlockingDisposableMultiObserver.java │ │ │ ├── BlockingFirstObserver.java │ │ │ ├── BlockingLastObserver.java │ │ │ ├── BlockingMultiObserver.java │ │ │ ├── BlockingObserver.java │ │ │ ├── CallbackCompletableObserver.java │ │ │ ├── ConsumerSingleObserver.java │ │ │ ├── DeferredScalarDisposable.java │ │ │ ├── DeferredScalarObserver.java │ │ │ ├── DisposableAutoReleaseMultiObserver.java │ │ │ ├── DisposableAutoReleaseObserver.java │ │ │ ├── DisposableLambdaObserver.java │ │ │ ├── EmptyCompletableObserver.java │ │ │ ├── ForEachWhileObserver.java │ │ │ ├── FutureMultiObserver.java │ │ │ ├── FutureObserver.java │ │ │ ├── InnerQueuedObserver.java │ │ │ ├── InnerQueuedObserverSupport.java │ │ │ ├── LambdaObserver.java │ │ │ ├── QueueDrainObserver.java │ │ │ ├── ResumeSingleObserver.java │ │ │ ├── SafeCompletableObserver.java │ │ │ ├── SafeMaybeObserver.java │ │ │ └── SafeSingleObserver.java │ │ ├── operators │ │ │ ├── completable │ │ │ │ ├── CompletableAmb.java │ │ │ │ ├── CompletableAndThenCompletable.java │ │ │ │ ├── CompletableCache.java │ │ │ │ ├── CompletableConcat.java │ │ │ │ ├── CompletableConcatArray.java │ │ │ │ ├── CompletableConcatIterable.java │ │ │ │ ├── CompletableCreate.java │ │ │ │ ├── CompletableDefer.java │ │ │ │ ├── CompletableDelay.java │ │ │ │ ├── CompletableDetach.java │ │ │ │ ├── CompletableDisposeOn.java │ │ │ │ ├── CompletableDoFinally.java │ │ │ │ ├── CompletableDoOnEvent.java │ │ │ │ ├── CompletableEmpty.java │ │ │ │ ├── CompletableError.java │ │ │ │ ├── CompletableErrorSupplier.java │ │ │ │ ├── CompletableFromAction.java │ │ │ │ ├── CompletableFromCallable.java │ │ │ │ ├── CompletableFromObservable.java │ │ │ │ ├── CompletableFromPublisher.java │ │ │ │ ├── CompletableFromRunnable.java │ │ │ │ ├── CompletableFromSingle.java │ │ │ │ ├── CompletableFromSupplier.java │ │ │ │ ├── CompletableFromUnsafeSource.java │ │ │ │ ├── CompletableHide.java │ │ │ │ ├── CompletableLift.java │ │ │ │ ├── CompletableMaterialize.java │ │ │ │ ├── CompletableMerge.java │ │ │ │ ├── CompletableMergeArray.java │ │ │ │ ├── CompletableMergeArrayDelayError.java │ │ │ │ ├── CompletableMergeDelayErrorIterable.java │ │ │ │ ├── CompletableMergeIterable.java │ │ │ │ ├── CompletableNever.java │ │ │ │ ├── CompletableObserveOn.java │ │ │ │ ├── CompletableOnErrorComplete.java │ │ │ │ ├── CompletableOnErrorReturn.java │ │ │ │ ├── CompletablePeek.java │ │ │ │ ├── CompletableResumeNext.java │ │ │ │ ├── CompletableSubscribeOn.java │ │ │ │ ├── CompletableTakeUntilCompletable.java │ │ │ │ ├── CompletableTimeout.java │ │ │ │ ├── CompletableTimer.java │ │ │ │ ├── CompletableToFlowable.java │ │ │ │ ├── CompletableToObservable.java │ │ │ │ ├── CompletableToSingle.java │ │ │ │ └── CompletableUsing.java │ │ │ ├── flowable │ │ │ │ ├── AbstractBackpressureThrottlingSubscriber.java │ │ │ │ ├── AbstractFlowableWithUpstream.java │ │ │ │ ├── BlockingFlowableIterable.java │ │ │ │ ├── BlockingFlowableLatest.java │ │ │ │ ├── BlockingFlowableMostRecent.java │ │ │ │ ├── BlockingFlowableNext.java │ │ │ │ ├── FlowableAll.java │ │ │ │ ├── FlowableAllSingle.java │ │ │ │ ├── FlowableAmb.java │ │ │ │ ├── FlowableAny.java │ │ │ │ ├── FlowableAnySingle.java │ │ │ │ ├── FlowableAutoConnect.java │ │ │ │ ├── FlowableBlockingSubscribe.java │ │ │ │ ├── FlowableBuffer.java │ │ │ │ ├── FlowableBufferBoundary.java │ │ │ │ ├── FlowableBufferExactBoundary.java │ │ │ │ ├── FlowableBufferTimed.java │ │ │ │ ├── FlowableCache.java │ │ │ │ ├── FlowableCollect.java │ │ │ │ ├── FlowableCollectSingle.java │ │ │ │ ├── FlowableCombineLatest.java │ │ │ │ ├── FlowableConcatArray.java │ │ │ │ ├── FlowableConcatMap.java │ │ │ │ ├── FlowableConcatMapEager.java │ │ │ │ ├── FlowableConcatMapEagerPublisher.java │ │ │ │ ├── FlowableConcatMapScheduler.java │ │ │ │ ├── FlowableConcatWithCompletable.java │ │ │ │ ├── FlowableConcatWithMaybe.java │ │ │ │ ├── FlowableConcatWithSingle.java │ │ │ │ ├── FlowableCount.java │ │ │ │ ├── FlowableCountSingle.java │ │ │ │ ├── FlowableCreate.java │ │ │ │ ├── FlowableDebounce.java │ │ │ │ ├── FlowableDebounceTimed.java │ │ │ │ ├── FlowableDefer.java │ │ │ │ ├── FlowableDelay.java │ │ │ │ ├── FlowableDelaySubscriptionOther.java │ │ │ │ ├── FlowableDematerialize.java │ │ │ │ ├── FlowableDetach.java │ │ │ │ ├── FlowableDistinct.java │ │ │ │ ├── FlowableDistinctUntilChanged.java │ │ │ │ ├── FlowableDoAfterNext.java │ │ │ │ ├── FlowableDoFinally.java │ │ │ │ ├── FlowableDoOnEach.java │ │ │ │ ├── FlowableDoOnLifecycle.java │ │ │ │ ├── FlowableElementAt.java │ │ │ │ ├── FlowableElementAtMaybe.java │ │ │ │ ├── FlowableElementAtMaybePublisher.java │ │ │ │ ├── FlowableElementAtSingle.java │ │ │ │ ├── FlowableEmpty.java │ │ │ │ ├── FlowableError.java │ │ │ │ ├── FlowableFilter.java │ │ │ │ ├── FlowableFlatMap.java │ │ │ │ ├── FlowableFlatMapCompletable.java │ │ │ │ ├── FlowableFlatMapCompletableCompletable.java │ │ │ │ ├── FlowableFlatMapMaybe.java │ │ │ │ ├── FlowableFlatMapMaybePublisher.java │ │ │ │ ├── FlowableFlatMapSingle.java │ │ │ │ ├── FlowableFlatMapSinglePublisher.java │ │ │ │ ├── FlowableFlattenIterable.java │ │ │ │ ├── FlowableFromAction.java │ │ │ │ ├── FlowableFromArray.java │ │ │ │ ├── FlowableFromCallable.java │ │ │ │ ├── FlowableFromCompletable.java │ │ │ │ ├── FlowableFromFuture.java │ │ │ │ ├── FlowableFromIterable.java │ │ │ │ ├── FlowableFromObservable.java │ │ │ │ ├── FlowableFromPublisher.java │ │ │ │ ├── FlowableFromRunnable.java │ │ │ │ ├── FlowableFromSupplier.java │ │ │ │ ├── FlowableGenerate.java │ │ │ │ ├── FlowableGroupBy.java │ │ │ │ ├── FlowableGroupJoin.java │ │ │ │ ├── FlowableHide.java │ │ │ │ ├── FlowableIgnoreElements.java │ │ │ │ ├── FlowableIgnoreElementsCompletable.java │ │ │ │ ├── FlowableInternalHelper.java │ │ │ │ ├── FlowableInterval.java │ │ │ │ ├── FlowableIntervalRange.java │ │ │ │ ├── FlowableJoin.java │ │ │ │ ├── FlowableJust.java │ │ │ │ ├── FlowableLastMaybe.java │ │ │ │ ├── FlowableLastSingle.java │ │ │ │ ├── FlowableLift.java │ │ │ │ ├── FlowableMap.java │ │ │ │ ├── FlowableMapNotification.java │ │ │ │ ├── FlowableMapPublisher.java │ │ │ │ ├── FlowableMaterialize.java │ │ │ │ ├── FlowableMergeWithCompletable.java │ │ │ │ ├── FlowableMergeWithMaybe.java │ │ │ │ ├── FlowableMergeWithSingle.java │ │ │ │ ├── FlowableNever.java │ │ │ │ ├── FlowableObserveOn.java │ │ │ │ ├── FlowableOnBackpressureBuffer.java │ │ │ │ ├── FlowableOnBackpressureBufferStrategy.java │ │ │ │ ├── FlowableOnBackpressureDrop.java │ │ │ │ ├── FlowableOnBackpressureError.java │ │ │ │ ├── FlowableOnBackpressureLatest.java │ │ │ │ ├── FlowableOnBackpressureReduce.java │ │ │ │ ├── FlowableOnBackpressureReduceWith.java │ │ │ │ ├── FlowableOnErrorComplete.java │ │ │ │ ├── FlowableOnErrorNext.java │ │ │ │ ├── FlowableOnErrorReturn.java │ │ │ │ ├── FlowablePublish.java │ │ │ │ ├── FlowablePublishMulticast.java │ │ │ │ ├── FlowableRange.java │ │ │ │ ├── FlowableRangeLong.java │ │ │ │ ├── FlowableReduce.java │ │ │ │ ├── FlowableReduceMaybe.java │ │ │ │ ├── FlowableReduceSeedSingle.java │ │ │ │ ├── FlowableReduceWithSingle.java │ │ │ │ ├── FlowableRefCount.java │ │ │ │ ├── FlowableRepeat.java │ │ │ │ ├── FlowableRepeatUntil.java │ │ │ │ ├── FlowableRepeatWhen.java │ │ │ │ ├── FlowableReplay.java │ │ │ │ ├── FlowableRetryBiPredicate.java │ │ │ │ ├── FlowableRetryPredicate.java │ │ │ │ ├── FlowableRetryWhen.java │ │ │ │ ├── FlowableSamplePublisher.java │ │ │ │ ├── FlowableSampleTimed.java │ │ │ │ ├── FlowableScalarXMap.java │ │ │ │ ├── FlowableScan.java │ │ │ │ ├── FlowableScanSeed.java │ │ │ │ ├── FlowableSequenceEqual.java │ │ │ │ ├── FlowableSequenceEqualSingle.java │ │ │ │ ├── FlowableSerialized.java │ │ │ │ ├── FlowableSingle.java │ │ │ │ ├── FlowableSingleMaybe.java │ │ │ │ ├── FlowableSingleSingle.java │ │ │ │ ├── FlowableSkip.java │ │ │ │ ├── FlowableSkipLast.java │ │ │ │ ├── FlowableSkipLastTimed.java │ │ │ │ ├── FlowableSkipUntil.java │ │ │ │ ├── FlowableSkipWhile.java │ │ │ │ ├── FlowableSubscribeOn.java │ │ │ │ ├── FlowableSwitchIfEmpty.java │ │ │ │ ├── FlowableSwitchMap.java │ │ │ │ ├── FlowableTake.java │ │ │ │ ├── FlowableTakeLast.java │ │ │ │ ├── FlowableTakeLastOne.java │ │ │ │ ├── FlowableTakeLastTimed.java │ │ │ │ ├── FlowableTakePublisher.java │ │ │ │ ├── FlowableTakeUntil.java │ │ │ │ ├── FlowableTakeUntilPredicate.java │ │ │ │ ├── FlowableTakeWhile.java │ │ │ │ ├── FlowableThrottleFirstTimed.java │ │ │ │ ├── FlowableThrottleLatest.java │ │ │ │ ├── FlowableTimeInterval.java │ │ │ │ ├── FlowableTimeout.java │ │ │ │ ├── FlowableTimeoutTimed.java │ │ │ │ ├── FlowableTimer.java │ │ │ │ ├── FlowableToList.java │ │ │ │ ├── FlowableToListSingle.java │ │ │ │ ├── FlowableUnsubscribeOn.java │ │ │ │ ├── FlowableUsing.java │ │ │ │ ├── FlowableWindow.java │ │ │ │ ├── FlowableWindowBoundary.java │ │ │ │ ├── FlowableWindowBoundarySelector.java │ │ │ │ ├── FlowableWindowSubscribeIntercept.java │ │ │ │ ├── FlowableWindowTimed.java │ │ │ │ ├── FlowableWithLatestFrom.java │ │ │ │ ├── FlowableWithLatestFromMany.java │ │ │ │ ├── FlowableZip.java │ │ │ │ └── FlowableZipIterable.java │ │ │ ├── maybe │ │ │ │ ├── AbstractMaybeWithUpstream.java │ │ │ │ ├── MaybeAmb.java │ │ │ │ ├── MaybeCache.java │ │ │ │ ├── MaybeCallbackObserver.java │ │ │ │ ├── MaybeConcatArray.java │ │ │ │ ├── MaybeConcatArrayDelayError.java │ │ │ │ ├── MaybeConcatIterable.java │ │ │ │ ├── MaybeContains.java │ │ │ │ ├── MaybeCount.java │ │ │ │ ├── MaybeCreate.java │ │ │ │ ├── MaybeDefer.java │ │ │ │ ├── MaybeDelay.java │ │ │ │ ├── MaybeDelayOtherPublisher.java │ │ │ │ ├── MaybeDelaySubscriptionOtherPublisher.java │ │ │ │ ├── MaybeDelayWithCompletable.java │ │ │ │ ├── MaybeDematerialize.java │ │ │ │ ├── MaybeDetach.java │ │ │ │ ├── MaybeDoAfterSuccess.java │ │ │ │ ├── MaybeDoFinally.java │ │ │ │ ├── MaybeDoOnEvent.java │ │ │ │ ├── MaybeDoOnLifecycle.java │ │ │ │ ├── MaybeDoOnTerminate.java │ │ │ │ ├── MaybeEmpty.java │ │ │ │ ├── MaybeEqualSingle.java │ │ │ │ ├── MaybeError.java │ │ │ │ ├── MaybeErrorCallable.java │ │ │ │ ├── MaybeFilter.java │ │ │ │ ├── MaybeFilterSingle.java │ │ │ │ ├── MaybeFlatMapBiSelector.java │ │ │ │ ├── MaybeFlatMapCompletable.java │ │ │ │ ├── MaybeFlatMapIterableFlowable.java │ │ │ │ ├── MaybeFlatMapIterableObservable.java │ │ │ │ ├── MaybeFlatMapNotification.java │ │ │ │ ├── MaybeFlatMapSingle.java │ │ │ │ ├── MaybeFlatten.java │ │ │ │ ├── MaybeFromAction.java │ │ │ │ ├── MaybeFromCallable.java │ │ │ │ ├── MaybeFromCompletable.java │ │ │ │ ├── MaybeFromFuture.java │ │ │ │ ├── MaybeFromRunnable.java │ │ │ │ ├── MaybeFromSingle.java │ │ │ │ ├── MaybeFromSupplier.java │ │ │ │ ├── MaybeHide.java │ │ │ │ ├── MaybeIgnoreElement.java │ │ │ │ ├── MaybeIgnoreElementCompletable.java │ │ │ │ ├── MaybeIsEmpty.java │ │ │ │ ├── MaybeIsEmptySingle.java │ │ │ │ ├── MaybeJust.java │ │ │ │ ├── MaybeLift.java │ │ │ │ ├── MaybeMap.java │ │ │ │ ├── MaybeMaterialize.java │ │ │ │ ├── MaybeMergeArray.java │ │ │ │ ├── MaybeNever.java │ │ │ │ ├── MaybeObserveOn.java │ │ │ │ ├── MaybeOnErrorComplete.java │ │ │ │ ├── MaybeOnErrorNext.java │ │ │ │ ├── MaybeOnErrorReturn.java │ │ │ │ ├── MaybePeek.java │ │ │ │ ├── MaybeSubscribeOn.java │ │ │ │ ├── MaybeSwitchIfEmpty.java │ │ │ │ ├── MaybeSwitchIfEmptySingle.java │ │ │ │ ├── MaybeTakeUntilMaybe.java │ │ │ │ ├── MaybeTakeUntilPublisher.java │ │ │ │ ├── MaybeTimeInterval.java │ │ │ │ ├── MaybeTimeoutMaybe.java │ │ │ │ ├── MaybeTimeoutPublisher.java │ │ │ │ ├── MaybeTimer.java │ │ │ │ ├── MaybeToFlowable.java │ │ │ │ ├── MaybeToObservable.java │ │ │ │ ├── MaybeToPublisher.java │ │ │ │ ├── MaybeToSingle.java │ │ │ │ ├── MaybeUnsafeCreate.java │ │ │ │ ├── MaybeUnsubscribeOn.java │ │ │ │ ├── MaybeUsing.java │ │ │ │ ├── MaybeZipArray.java │ │ │ │ └── MaybeZipIterable.java │ │ │ ├── mixed │ │ │ │ ├── CompletableAndThenObservable.java │ │ │ │ ├── CompletableAndThenPublisher.java │ │ │ │ ├── ConcatMapXMainObserver.java │ │ │ │ ├── ConcatMapXMainSubscriber.java │ │ │ │ ├── FlowableConcatMapCompletable.java │ │ │ │ ├── FlowableConcatMapMaybe.java │ │ │ │ ├── FlowableConcatMapMaybePublisher.java │ │ │ │ ├── FlowableConcatMapSingle.java │ │ │ │ ├── FlowableConcatMapSinglePublisher.java │ │ │ │ ├── FlowableSwitchMapCompletable.java │ │ │ │ ├── FlowableSwitchMapCompletablePublisher.java │ │ │ │ ├── FlowableSwitchMapMaybe.java │ │ │ │ ├── FlowableSwitchMapMaybePublisher.java │ │ │ │ ├── FlowableSwitchMapSingle.java │ │ │ │ ├── FlowableSwitchMapSinglePublisher.java │ │ │ │ ├── MaterializeSingleObserver.java │ │ │ │ ├── MaybeFlatMapObservable.java │ │ │ │ ├── MaybeFlatMapPublisher.java │ │ │ │ ├── ObservableConcatMapCompletable.java │ │ │ │ ├── ObservableConcatMapMaybe.java │ │ │ │ ├── ObservableConcatMapSingle.java │ │ │ │ ├── ObservableSwitchMapCompletable.java │ │ │ │ ├── ObservableSwitchMapMaybe.java │ │ │ │ ├── ObservableSwitchMapSingle.java │ │ │ │ ├── ScalarXMapZHelper.java │ │ │ │ └── SingleFlatMapObservable.java │ │ │ ├── observable │ │ │ │ ├── AbstractObservableWithUpstream.java │ │ │ │ ├── BlockingObservableIterable.java │ │ │ │ ├── BlockingObservableLatest.java │ │ │ │ ├── BlockingObservableMostRecent.java │ │ │ │ ├── BlockingObservableNext.java │ │ │ │ ├── ObservableAll.java │ │ │ │ ├── ObservableAllSingle.java │ │ │ │ ├── ObservableAmb.java │ │ │ │ ├── ObservableAny.java │ │ │ │ ├── ObservableAnySingle.java │ │ │ │ ├── ObservableAutoConnect.java │ │ │ │ ├── ObservableBlockingSubscribe.java │ │ │ │ ├── ObservableBuffer.java │ │ │ │ ├── ObservableBufferBoundary.java │ │ │ │ ├── ObservableBufferExactBoundary.java │ │ │ │ ├── ObservableBufferTimed.java │ │ │ │ ├── ObservableCache.java │ │ │ │ ├── ObservableCollect.java │ │ │ │ ├── ObservableCollectSingle.java │ │ │ │ ├── ObservableCombineLatest.java │ │ │ │ ├── ObservableConcatMap.java │ │ │ │ ├── ObservableConcatMapEager.java │ │ │ │ ├── ObservableConcatMapScheduler.java │ │ │ │ ├── ObservableConcatWithCompletable.java │ │ │ │ ├── ObservableConcatWithMaybe.java │ │ │ │ ├── ObservableConcatWithSingle.java │ │ │ │ ├── ObservableCount.java │ │ │ │ ├── ObservableCountSingle.java │ │ │ │ ├── ObservableCreate.java │ │ │ │ ├── ObservableDebounce.java │ │ │ │ ├── ObservableDebounceTimed.java │ │ │ │ ├── ObservableDefer.java │ │ │ │ ├── ObservableDelay.java │ │ │ │ ├── ObservableDelaySubscriptionOther.java │ │ │ │ ├── ObservableDematerialize.java │ │ │ │ ├── ObservableDetach.java │ │ │ │ ├── ObservableDistinct.java │ │ │ │ ├── ObservableDistinctUntilChanged.java │ │ │ │ ├── ObservableDoAfterNext.java │ │ │ │ ├── ObservableDoFinally.java │ │ │ │ ├── ObservableDoOnEach.java │ │ │ │ ├── ObservableDoOnLifecycle.java │ │ │ │ ├── ObservableElementAt.java │ │ │ │ ├── ObservableElementAtMaybe.java │ │ │ │ ├── ObservableElementAtSingle.java │ │ │ │ ├── ObservableEmpty.java │ │ │ │ ├── ObservableError.java │ │ │ │ ├── ObservableFilter.java │ │ │ │ ├── ObservableFlatMap.java │ │ │ │ ├── ObservableFlatMapCompletable.java │ │ │ │ ├── ObservableFlatMapCompletableCompletable.java │ │ │ │ ├── ObservableFlatMapMaybe.java │ │ │ │ ├── ObservableFlatMapSingle.java │ │ │ │ ├── ObservableFlattenIterable.java │ │ │ │ ├── ObservableFromAction.java │ │ │ │ ├── ObservableFromArray.java │ │ │ │ ├── ObservableFromCallable.java │ │ │ │ ├── ObservableFromCompletable.java │ │ │ │ ├── ObservableFromFuture.java │ │ │ │ ├── ObservableFromIterable.java │ │ │ │ ├── ObservableFromPublisher.java │ │ │ │ ├── ObservableFromRunnable.java │ │ │ │ ├── ObservableFromSupplier.java │ │ │ │ ├── ObservableFromUnsafeSource.java │ │ │ │ ├── ObservableGenerate.java │ │ │ │ ├── ObservableGroupBy.java │ │ │ │ ├── ObservableGroupJoin.java │ │ │ │ ├── ObservableHide.java │ │ │ │ ├── ObservableIgnoreElements.java │ │ │ │ ├── ObservableIgnoreElementsCompletable.java │ │ │ │ ├── ObservableInternalHelper.java │ │ │ │ ├── ObservableInterval.java │ │ │ │ ├── ObservableIntervalRange.java │ │ │ │ ├── ObservableJoin.java │ │ │ │ ├── ObservableJust.java │ │ │ │ ├── ObservableLastMaybe.java │ │ │ │ ├── ObservableLastSingle.java │ │ │ │ ├── ObservableLift.java │ │ │ │ ├── ObservableMap.java │ │ │ │ ├── ObservableMapNotification.java │ │ │ │ ├── ObservableMaterialize.java │ │ │ │ ├── ObservableMergeWithCompletable.java │ │ │ │ ├── ObservableMergeWithMaybe.java │ │ │ │ ├── ObservableMergeWithSingle.java │ │ │ │ ├── ObservableNever.java │ │ │ │ ├── ObservableObserveOn.java │ │ │ │ ├── ObservableOnErrorComplete.java │ │ │ │ ├── ObservableOnErrorNext.java │ │ │ │ ├── ObservableOnErrorReturn.java │ │ │ │ ├── ObservablePublish.java │ │ │ │ ├── ObservablePublishSelector.java │ │ │ │ ├── ObservableRange.java │ │ │ │ ├── ObservableRangeLong.java │ │ │ │ ├── ObservableReduceMaybe.java │ │ │ │ ├── ObservableReduceSeedSingle.java │ │ │ │ ├── ObservableReduceWithSingle.java │ │ │ │ ├── ObservableRefCount.java │ │ │ │ ├── ObservableRepeat.java │ │ │ │ ├── ObservableRepeatUntil.java │ │ │ │ ├── ObservableRepeatWhen.java │ │ │ │ ├── ObservableReplay.java │ │ │ │ ├── ObservableRetryBiPredicate.java │ │ │ │ ├── ObservableRetryPredicate.java │ │ │ │ ├── ObservableRetryWhen.java │ │ │ │ ├── ObservableSampleTimed.java │ │ │ │ ├── ObservableSampleWithObservable.java │ │ │ │ ├── ObservableScalarXMap.java │ │ │ │ ├── ObservableScan.java │ │ │ │ ├── ObservableScanSeed.java │ │ │ │ ├── ObservableSequenceEqual.java │ │ │ │ ├── ObservableSequenceEqualSingle.java │ │ │ │ ├── ObservableSerialized.java │ │ │ │ ├── ObservableSingleMaybe.java │ │ │ │ ├── ObservableSingleSingle.java │ │ │ │ ├── ObservableSkip.java │ │ │ │ ├── ObservableSkipLast.java │ │ │ │ ├── ObservableSkipLastTimed.java │ │ │ │ ├── ObservableSkipUntil.java │ │ │ │ ├── ObservableSkipWhile.java │ │ │ │ ├── ObservableSubscribeOn.java │ │ │ │ ├── ObservableSwitchIfEmpty.java │ │ │ │ ├── ObservableSwitchMap.java │ │ │ │ ├── ObservableTake.java │ │ │ │ ├── ObservableTakeLast.java │ │ │ │ ├── ObservableTakeLastOne.java │ │ │ │ ├── ObservableTakeLastTimed.java │ │ │ │ ├── ObservableTakeUntil.java │ │ │ │ ├── ObservableTakeUntilPredicate.java │ │ │ │ ├── ObservableTakeWhile.java │ │ │ │ ├── ObservableThrottleFirstTimed.java │ │ │ │ ├── ObservableThrottleLatest.java │ │ │ │ ├── ObservableTimeInterval.java │ │ │ │ ├── ObservableTimeout.java │ │ │ │ ├── ObservableTimeoutTimed.java │ │ │ │ ├── ObservableTimer.java │ │ │ │ ├── ObservableToList.java │ │ │ │ ├── ObservableToListSingle.java │ │ │ │ ├── ObservableUnsubscribeOn.java │ │ │ │ ├── ObservableUsing.java │ │ │ │ ├── ObservableWindow.java │ │ │ │ ├── ObservableWindowBoundary.java │ │ │ │ ├── ObservableWindowBoundarySelector.java │ │ │ │ ├── ObservableWindowSubscribeIntercept.java │ │ │ │ ├── ObservableWindowTimed.java │ │ │ │ ├── ObservableWithLatestFrom.java │ │ │ │ ├── ObservableWithLatestFromMany.java │ │ │ │ ├── ObservableZip.java │ │ │ │ ├── ObservableZipIterable.java │ │ │ │ └── ObserverResourceWrapper.java │ │ │ ├── parallel │ │ │ │ ├── ParallelCollect.java │ │ │ │ ├── ParallelConcatMap.java │ │ │ │ ├── ParallelDoOnNextTry.java │ │ │ │ ├── ParallelFilter.java │ │ │ │ ├── ParallelFilterTry.java │ │ │ │ ├── ParallelFlatMap.java │ │ │ │ ├── ParallelFlatMapIterable.java │ │ │ │ ├── ParallelFromArray.java │ │ │ │ ├── ParallelFromPublisher.java │ │ │ │ ├── ParallelJoin.java │ │ │ │ ├── ParallelMap.java │ │ │ │ ├── ParallelMapTry.java │ │ │ │ ├── ParallelPeek.java │ │ │ │ ├── ParallelReduce.java │ │ │ │ ├── ParallelReduceFull.java │ │ │ │ ├── ParallelRunOn.java │ │ │ │ └── ParallelSortedJoin.java │ │ │ └── single │ │ │ │ ├── SingleAmb.java │ │ │ │ ├── SingleCache.java │ │ │ │ ├── SingleContains.java │ │ │ │ ├── SingleCreate.java │ │ │ │ ├── SingleDefer.java │ │ │ │ ├── SingleDelay.java │ │ │ │ ├── SingleDelayWithCompletable.java │ │ │ │ ├── SingleDelayWithObservable.java │ │ │ │ ├── SingleDelayWithPublisher.java │ │ │ │ ├── SingleDelayWithSingle.java │ │ │ │ ├── SingleDematerialize.java │ │ │ │ ├── SingleDetach.java │ │ │ │ ├── SingleDoAfterSuccess.java │ │ │ │ ├── SingleDoAfterTerminate.java │ │ │ │ ├── SingleDoFinally.java │ │ │ │ ├── SingleDoOnDispose.java │ │ │ │ ├── SingleDoOnError.java │ │ │ │ ├── SingleDoOnEvent.java │ │ │ │ ├── SingleDoOnLifecycle.java │ │ │ │ ├── SingleDoOnSubscribe.java │ │ │ │ ├── SingleDoOnSuccess.java │ │ │ │ ├── SingleDoOnTerminate.java │ │ │ │ ├── SingleEquals.java │ │ │ │ ├── SingleError.java │ │ │ │ ├── SingleFlatMap.java │ │ │ │ ├── SingleFlatMapBiSelector.java │ │ │ │ ├── SingleFlatMapCompletable.java │ │ │ │ ├── SingleFlatMapIterableFlowable.java │ │ │ │ ├── SingleFlatMapIterableObservable.java │ │ │ │ ├── SingleFlatMapMaybe.java │ │ │ │ ├── SingleFlatMapNotification.java │ │ │ │ ├── SingleFlatMapPublisher.java │ │ │ │ ├── SingleFromCallable.java │ │ │ │ ├── SingleFromPublisher.java │ │ │ │ ├── SingleFromSupplier.java │ │ │ │ ├── SingleFromUnsafeSource.java │ │ │ │ ├── SingleHide.java │ │ │ │ ├── SingleInternalHelper.java │ │ │ │ ├── SingleJust.java │ │ │ │ ├── SingleLift.java │ │ │ │ ├── SingleMap.java │ │ │ │ ├── SingleMaterialize.java │ │ │ │ ├── SingleNever.java │ │ │ │ ├── SingleObserveOn.java │ │ │ │ ├── SingleOnErrorComplete.java │ │ │ │ ├── SingleOnErrorReturn.java │ │ │ │ ├── SingleResumeNext.java │ │ │ │ ├── SingleSubscribeOn.java │ │ │ │ ├── SingleTakeUntil.java │ │ │ │ ├── SingleTimeInterval.java │ │ │ │ ├── SingleTimeout.java │ │ │ │ ├── SingleTimer.java │ │ │ │ ├── SingleToFlowable.java │ │ │ │ ├── SingleToObservable.java │ │ │ │ ├── SingleUnsubscribeOn.java │ │ │ │ ├── SingleUsing.java │ │ │ │ ├── SingleZipArray.java │ │ │ │ └── SingleZipIterable.java │ │ ├── queue │ │ │ └── MpscLinkedQueue.java │ │ ├── schedulers │ │ │ ├── AbstractDirectTask.java │ │ │ ├── ComputationScheduler.java │ │ │ ├── DisposeOnCancel.java │ │ │ ├── ExecutorScheduler.java │ │ │ ├── ImmediateThinScheduler.java │ │ │ ├── InstantPeriodicTask.java │ │ │ ├── IoScheduler.java │ │ │ ├── NewThreadScheduler.java │ │ │ ├── NewThreadWorker.java │ │ │ ├── NonBlockingThread.java │ │ │ ├── RxThreadFactory.java │ │ │ ├── ScheduledDirectPeriodicTask.java │ │ │ ├── ScheduledDirectTask.java │ │ │ ├── ScheduledRunnable.java │ │ │ ├── SchedulerMultiWorkerSupport.java │ │ │ ├── SchedulerPoolFactory.java │ │ │ ├── SchedulerWhen.java │ │ │ ├── SingleScheduler.java │ │ │ └── TrampolineScheduler.java │ │ ├── subscribers │ │ │ ├── BasicFuseableConditionalSubscriber.java │ │ │ ├── BasicFuseableSubscriber.java │ │ │ ├── BlockingBaseSubscriber.java │ │ │ ├── BlockingFirstSubscriber.java │ │ │ ├── BlockingLastSubscriber.java │ │ │ ├── BlockingSubscriber.java │ │ │ ├── BoundedSubscriber.java │ │ │ ├── DeferredScalarSubscriber.java │ │ │ ├── DisposableAutoReleaseSubscriber.java │ │ │ ├── ForEachWhileSubscriber.java │ │ │ ├── FutureSubscriber.java │ │ │ ├── InnerQueuedSubscriber.java │ │ │ ├── InnerQueuedSubscriberSupport.java │ │ │ ├── LambdaSubscriber.java │ │ │ ├── QueueDrainSubscriber.java │ │ │ ├── SinglePostCompleteSubscriber.java │ │ │ ├── StrictSubscriber.java │ │ │ └── SubscriberResourceWrapper.java │ │ ├── subscriptions │ │ │ ├── ArrayCompositeSubscription.java │ │ │ ├── AsyncSubscription.java │ │ │ ├── BasicIntQueueSubscription.java │ │ │ ├── BasicQueueSubscription.java │ │ │ ├── BooleanSubscription.java │ │ │ ├── DeferredScalarSubscription.java │ │ │ ├── EmptySubscription.java │ │ │ ├── ScalarSubscription.java │ │ │ ├── SubscriptionArbiter.java │ │ │ └── SubscriptionHelper.java │ │ └── util │ │ │ ├── AppendOnlyLinkedArrayList.java │ │ │ ├── ArrayListSupplier.java │ │ │ ├── AtomicThrowable.java │ │ │ ├── BackpressureHelper.java │ │ │ ├── BlockingHelper.java │ │ │ ├── BlockingIgnoringReceiver.java │ │ │ ├── ConnectConsumer.java │ │ │ ├── EmptyComponent.java │ │ │ ├── EndConsumerHelper.java │ │ │ ├── ErrorMode.java │ │ │ ├── ExceptionHelper.java │ │ │ ├── HalfSerializer.java │ │ │ ├── HashMapSupplier.java │ │ │ ├── LinkedArrayList.java │ │ │ ├── ListAddBiConsumer.java │ │ │ ├── MergerBiFunction.java │ │ │ ├── NotificationLite.java │ │ │ ├── ObservableQueueDrain.java │ │ │ ├── OpenHashSet.java │ │ │ ├── Pow2.java │ │ │ ├── QueueDrain.java │ │ │ ├── QueueDrainHelper.java │ │ │ ├── SorterFunction.java │ │ │ ├── SuppressAnimalSniffer.java │ │ │ └── VolatileSizeArrayList.java │ │ ├── observables │ │ ├── ConnectableObservable.java │ │ ├── GroupedObservable.java │ │ └── package-info.java │ │ ├── observers │ │ ├── BaseTestConsumer.java │ │ ├── DefaultObserver.java │ │ ├── DisposableCompletableObserver.java │ │ ├── DisposableMaybeObserver.java │ │ ├── DisposableObserver.java │ │ ├── DisposableSingleObserver.java │ │ ├── LambdaConsumerIntrospection.java │ │ ├── ResourceCompletableObserver.java │ │ ├── ResourceMaybeObserver.java │ │ ├── ResourceObserver.java │ │ ├── ResourceSingleObserver.java │ │ ├── SafeObserver.java │ │ ├── SerializedObserver.java │ │ ├── TestObserver.java │ │ └── package-info.java │ │ ├── operators │ │ ├── ConditionalSubscriber.java │ │ ├── QueueDisposable.java │ │ ├── QueueFuseable.java │ │ ├── QueueSubscription.java │ │ ├── ScalarSupplier.java │ │ ├── SimplePlainQueue.java │ │ ├── SimpleQueue.java │ │ ├── SpscArrayQueue.java │ │ ├── SpscLinkedArrayQueue.java │ │ └── package-info.java │ │ ├── parallel │ │ ├── ParallelFailureHandling.java │ │ ├── ParallelFlowable.java │ │ ├── ParallelFlowableConverter.java │ │ ├── ParallelTransformer.java │ │ └── package-info.java │ │ ├── plugins │ │ ├── RxJavaPlugins.java │ │ └── package-info.java │ │ ├── processors │ │ ├── AsyncProcessor.java │ │ ├── BehaviorProcessor.java │ │ ├── FlowableProcessor.java │ │ ├── MulticastProcessor.java │ │ ├── PublishProcessor.java │ │ ├── ReplayProcessor.java │ │ ├── SerializedProcessor.java │ │ ├── UnicastProcessor.java │ │ └── package-info.java │ │ ├── schedulers │ │ ├── SchedulerRunnableIntrospection.java │ │ ├── Schedulers.java │ │ ├── TestScheduler.java │ │ ├── Timed.java │ │ └── package-info.java │ │ ├── subjects │ │ ├── AsyncSubject.java │ │ ├── BehaviorSubject.java │ │ ├── CompletableSubject.java │ │ ├── MaybeSubject.java │ │ ├── PublishSubject.java │ │ ├── ReplaySubject.java │ │ ├── SerializedSubject.java │ │ ├── SingleSubject.java │ │ ├── Subject.java │ │ ├── UnicastSubject.java │ │ └── package-info.java │ │ └── subscribers │ │ ├── DefaultSubscriber.java │ │ ├── DisposableSubscriber.java │ │ ├── ResourceSubscriber.java │ │ ├── SafeSubscriber.java │ │ ├── SerializedSubscriber.java │ │ ├── TestSubscriber.java │ │ └── package-info.java ├── module │ └── module-info.java └── resources │ └── META-INF │ └── proguard │ └── rxjava3.pro └── test └── java └── io └── reactivex └── rxjava3 ├── completable ├── CapturingUncaughtExceptionHandler.java ├── CompletableRetryTest.java ├── CompletableTest.java └── CompletableTimerTest.java ├── core ├── BackpressureEnumTest.java ├── ConverterTest.java ├── DisposeTaskTest.java ├── NotificationTest.java ├── PeriodicDirectTaskTest.java ├── Retry.java ├── RxJavaTest.java ├── SchedulerTest.java ├── TransformerTest.java └── XFlatMapTest.java ├── disposables ├── CompositeDisposableTest.java ├── DisposableTest.java ├── FutureDisposableTest.java ├── SequentialDisposableTest.java └── SerialDisposableTests.java ├── exceptions ├── CompositeExceptionTest.java ├── ExceptionsTest.java ├── OnErrorNotImplementedExceptionTest.java └── TestException.java ├── flowable ├── Burst.java ├── FlowableBackpressureTests.java ├── FlowableCollectTest.java ├── FlowableCombineLatestTests.java ├── FlowableConcatTests.java ├── FlowableConversionTest.java ├── FlowableCovarianceTest.java ├── FlowableDoAfterNextTest.java ├── FlowableDoOnTest.java ├── FlowableErrorHandlingTests.java ├── FlowableEventStream.java ├── FlowableEventStreamTest.java ├── FlowableFuseableTest.java ├── FlowableGroupByTests.java ├── FlowableMergeTests.java ├── FlowableNotificationTest.java ├── FlowableNullTests.java ├── FlowableReduceTests.java ├── FlowableStartWithTests.java ├── FlowableSubscriberTest.java ├── FlowableTests.java ├── FlowableThrottleLastTests.java ├── FlowableThrottleWithTimeoutTests.java ├── FlowableWindowTests.java └── FlowableZipTests.java ├── internal ├── SubscribeWithTest.java ├── disposables │ ├── ArrayCompositeDisposableTest.java │ ├── CancellableDisposableTest.java │ ├── DisposableHelperTest.java │ ├── EmptyDisposableTest.java │ └── ListCompositeDisposableTest.java ├── functions │ ├── FunctionsTest.java │ └── ObjectHelperTest.java ├── fuseable │ └── CancellableQueueFuseableTest.java ├── jdk8 │ ├── CollectWithCollectorTckTest.java │ ├── CompletableFromCompletionStageTest.java │ ├── CompletableToCompletionStageTest.java │ ├── FlatMapStream0HTckTest.java │ ├── FlatMapStream0TckTest.java │ ├── FlatMapStream1HTckTest.java │ ├── FlatMapStream1TckTest.java │ ├── FlatMapStream2HTckTest.java │ ├── FlatMapStream2TckTest.java │ ├── FlowableBlockingStreamTest.java │ ├── FlowableCollectWithCollectorTest.java │ ├── FlowableFlatMapStreamTest.java │ ├── FlowableFromCompletionStageTest.java │ ├── FlowableFromOptionalTest.java │ ├── FlowableFromStreamTest.java │ ├── FlowableMapOptionalTest.java │ ├── FlowableStageSubscriberOrDefaultTest.java │ ├── FlowableStageSubscriberOrErrorTest.java │ ├── FromCompletionStageTckTest.java │ ├── FromOptional0TckTest.java │ ├── FromOptional1TckTest.java │ ├── FromStreamTckTest.java │ ├── MapOptionalTckTest.java │ ├── MaybeFlattenStreamAsFlowableTckTest.java │ ├── MaybeFlattenStreamAsFlowableTest.java │ ├── MaybeFlattenStreamAsObservableTest.java │ ├── MaybeFromCompletionStageTest.java │ ├── MaybeFromOptionalTest.java │ ├── MaybeMapOptionalTest.java │ ├── MaybeToCompletionStageTest.java │ ├── ObservableBlockingStreamTest.java │ ├── ObservableCollectWithCollectorTest.java │ ├── ObservableFlatMapStreamTest.java │ ├── ObservableFromCompletionStageTest.java │ ├── ObservableFromOptionalTest.java │ ├── ObservableFromStreamTest.java │ ├── ObservableMapOptionalTest.java │ ├── ObservableStageSubscriberOrDefaultTest.java │ ├── ObservableStageSubscriberOrErrorTest.java │ ├── ParallelCollectorTest.java │ ├── ParallelFlatMapStreamTest.java │ ├── ParallelMapOptionalTest.java │ ├── ParallelMapTryOptionalTest.java │ ├── SingleFlattenStreamAsFlowableTckTest.java │ ├── SingleFlattenStreamAsFlowableTest.java │ ├── SingleFlattenStreamAsObservableTest.java │ ├── SingleFromCompletionStageTest.java │ ├── SingleMapOptionalTest.java │ └── SingleToCompletionStageTest.java ├── observers │ ├── BasicFuseableObserverTest.java │ ├── BasicQueueDisposableTest.java │ ├── BlockingFirstObserverTest.java │ ├── BlockingMultiObserverTest.java │ ├── BlockingObserverTest.java │ ├── CallbackCompletableObserverTest.java │ ├── CompletableConsumersTest.java │ ├── ConsumerSingleObserverTest.java │ ├── DeferredScalarDisposableTest.java │ ├── DeferredScalarObserverTest.java │ ├── DisposableLambdaObserverTest.java │ ├── EmptyCompletableObserverTest.java │ ├── FutureMultiObserverTest.java │ ├── FutureObserverTest.java │ ├── FutureSingleObserverTest.java │ ├── InnerQueuedObserverTest.java │ ├── LambdaObserverTest.java │ ├── MaybeConsumersTest.java │ ├── ObservableConsumersTest.java │ ├── QueueDrainObserverTest.java │ └── SingleConsumersTest.java ├── operators │ ├── completable │ │ ├── CompletableAmbTest.java │ │ ├── CompletableAndThenCompletableTest.java │ │ ├── CompletableAndThenTest.java │ │ ├── CompletableAwaitTest.java │ │ ├── CompletableBlockingSubscribeTest.java │ │ ├── CompletableCacheTest.java │ │ ├── CompletableConcatArrayDelayErrorTest.java │ │ ├── CompletableConcatDelayErrorTest.java │ │ ├── CompletableConcatTest.java │ │ ├── CompletableCreateTest.java │ │ ├── CompletableDelaySubscriptionTest.java │ │ ├── CompletableDelayTest.java │ │ ├── CompletableDetachTest.java │ │ ├── CompletableDisposeOnTest.java │ │ ├── CompletableDoFinallyTest.java │ │ ├── CompletableDoOnLifecycleTest.java │ │ ├── CompletableDoOnTest.java │ │ ├── CompletableFromActionTest.java │ │ ├── CompletableFromCallableTest.java │ │ ├── CompletableFromMaybeTest.java │ │ ├── CompletableFromObservableTest.java │ │ ├── CompletableFromPublisherTest.java │ │ ├── CompletableFromRunnableTest.java │ │ ├── CompletableFromSingleTest.java │ │ ├── CompletableFromSupplierTest.java │ │ ├── CompletableHideTest.java │ │ ├── CompletableLiftTest.java │ │ ├── CompletableMaterializeTest.java │ │ ├── CompletableMergeIterableTest.java │ │ ├── CompletableMergeTest.java │ │ ├── CompletableObserveOnTest.java │ │ ├── CompletableOnErrorXTest.java │ │ ├── CompletablePeekTest.java │ │ ├── CompletableRepeatWhenTest.java │ │ ├── CompletableResumeNextTest.java │ │ ├── CompletableSafeSubscribeTest.java │ │ ├── CompletableSequenceEqualTest.java │ │ ├── CompletableStartWithTest.java │ │ ├── CompletableSubscribeOnTest.java │ │ ├── CompletableSubscribeTest.java │ │ ├── CompletableSwitchOnNextTest.java │ │ ├── CompletableTakeUntilTest.java │ │ ├── CompletableTimeoutTest.java │ │ ├── CompletableTimerTest.java │ │ ├── CompletableToFlowableTest.java │ │ ├── CompletableToFutureTest.java │ │ ├── CompletableToObservableTest.java │ │ ├── CompletableUnsafeTest.java │ │ └── CompletableUsingTest.java │ ├── flowable │ │ ├── AbstractFlowableWithUpstreamTest.java │ │ ├── BlockingFlowableLatestTest.java │ │ ├── BlockingFlowableMostRecentTest.java │ │ ├── BlockingFlowableNextTest.java │ │ ├── BlockingFlowableToFutureTest.java │ │ ├── BlockingFlowableToIteratorTest.java │ │ ├── BufferUntilSubscriberTest.java │ │ ├── FlowableAllTest.java │ │ ├── FlowableAmbTest.java │ │ ├── FlowableAnyTest.java │ │ ├── FlowableAsObservableTest.java │ │ ├── FlowableAutoConnectTest.java │ │ ├── FlowableBlockingTest.java │ │ ├── FlowableBufferTest.java │ │ ├── FlowableCacheTest.java │ │ ├── FlowableCastTest.java │ │ ├── FlowableCombineLatestTest.java │ │ ├── FlowableConcatDelayErrorTest.java │ │ ├── FlowableConcatMapEagerTest.java │ │ ├── FlowableConcatMapSchedulerTest.java │ │ ├── FlowableConcatMapTest.java │ │ ├── FlowableConcatTest.java │ │ ├── FlowableConcatWithCompletableTest.java │ │ ├── FlowableConcatWithMaybeTest.java │ │ ├── FlowableConcatWithSingleTest.java │ │ ├── FlowableCountTest.java │ │ ├── FlowableCreateTest.java │ │ ├── FlowableDebounceTest.java │ │ ├── FlowableDefaultIfEmptyTest.java │ │ ├── FlowableDeferTest.java │ │ ├── FlowableDelaySubscriptionOtherTest.java │ │ ├── FlowableDelayTest.java │ │ ├── FlowableDematerializeTest.java │ │ ├── FlowableDetachTest.java │ │ ├── FlowableDistinctTest.java │ │ ├── FlowableDistinctUntilChangedTest.java │ │ ├── FlowableDoAfterNextTest.java │ │ ├── FlowableDoAfterTerminateTest.java │ │ ├── FlowableDoFinallyTest.java │ │ ├── FlowableDoOnEachTest.java │ │ ├── FlowableDoOnLifecycleTest.java │ │ ├── FlowableDoOnRequestTest.java │ │ ├── FlowableDoOnSubscribeTest.java │ │ ├── FlowableDoOnUnsubscribeTest.java │ │ ├── FlowableElementAtTest.java │ │ ├── FlowableFilterTest.java │ │ ├── FlowableFirstTest.java │ │ ├── FlowableFlatMapCompletableTest.java │ │ ├── FlowableFlatMapMaybeTest.java │ │ ├── FlowableFlatMapSingleTest.java │ │ ├── FlowableFlatMapTest.java │ │ ├── FlowableFlattenIterableTest.java │ │ ├── FlowableForEachTest.java │ │ ├── FlowableFromActionTest.java │ │ ├── FlowableFromArrayTest.java │ │ ├── FlowableFromCallableTest.java │ │ ├── FlowableFromCompletableTest.java │ │ ├── FlowableFromIterableTest.java │ │ ├── FlowableFromMaybeTest.java │ │ ├── FlowableFromObservableTest.java │ │ ├── FlowableFromRunnableTest.java │ │ ├── FlowableFromSingleTest.java │ │ ├── FlowableFromSourceTest.java │ │ ├── FlowableFromSupplierTest.java │ │ ├── FlowableGenerateTest.java │ │ ├── FlowableGroupByTest.java │ │ ├── FlowableGroupJoinTest.java │ │ ├── FlowableHideTest.java │ │ ├── FlowableIgnoreElementsTest.java │ │ ├── FlowableInternalHelperTest.java │ │ ├── FlowableIntervalRangeTest.java │ │ ├── FlowableIntervalTest.java │ │ ├── FlowableJoinTest.java │ │ ├── FlowableLastTest.java │ │ ├── FlowableLiftTest.java │ │ ├── FlowableMapNotificationTest.java │ │ ├── FlowableMapTest.java │ │ ├── FlowableMaterializeTest.java │ │ ├── FlowableMergeDelayErrorTest.java │ │ ├── FlowableMergeMaxConcurrentTest.java │ │ ├── FlowableMergeTest.java │ │ ├── FlowableMergeWithCompletableTest.java │ │ ├── FlowableMergeWithMaybeTest.java │ │ ├── FlowableMergeWithSingleTest.java │ │ ├── FlowableObserveOnTest.java │ │ ├── FlowableOnBackpressureBufferStrategyTest.java │ │ ├── FlowableOnBackpressureBufferTest.java │ │ ├── FlowableOnBackpressureDropTest.java │ │ ├── FlowableOnBackpressureErrorTest.java │ │ ├── FlowableOnBackpressureLatestTest.java │ │ ├── FlowableOnBackpressureReduceTest.java │ │ ├── FlowableOnBackpressureReduceWithTest.java │ │ ├── FlowableOnErrorCompleteTest.java │ │ ├── FlowableOnErrorResumeNextViaFlowableTest.java │ │ ├── FlowableOnErrorResumeNextViaFunctionTest.java │ │ ├── FlowableOnErrorReturnTest.java │ │ ├── FlowablePublishFunctionTest.java │ │ ├── FlowablePublishMulticastTest.java │ │ ├── FlowablePublishTest.java │ │ ├── FlowableRangeLongTest.java │ │ ├── FlowableRangeTest.java │ │ ├── FlowableReduceTest.java │ │ ├── FlowableReduceWithSingleTest.java │ │ ├── FlowableRefCountTest.java │ │ ├── FlowableRepeatTest.java │ │ ├── FlowableReplayEagerTruncateTest.java │ │ ├── FlowableReplayTest.java │ │ ├── FlowableRetryTest.java │ │ ├── FlowableRetryWithPredicateTest.java │ │ ├── FlowableSampleTest.java │ │ ├── FlowableScalarXMapTest.java │ │ ├── FlowableScanTest.java │ │ ├── FlowableSequenceEqualTest.java │ │ ├── FlowableSerializeTest.java │ │ ├── FlowableSingleTest.java │ │ ├── FlowableSkipLastTest.java │ │ ├── FlowableSkipLastTimedTest.java │ │ ├── FlowableSkipTest.java │ │ ├── FlowableSkipTimedTest.java │ │ ├── FlowableSkipUntilTest.java │ │ ├── FlowableSkipWhileTest.java │ │ ├── FlowableStartWithTest.java │ │ ├── FlowableSubscribeOnTest.java │ │ ├── FlowableSwitchIfEmptyTest.java │ │ ├── FlowableSwitchTest.java │ │ ├── FlowableTakeLastOneTest.java │ │ ├── FlowableTakeLastTest.java │ │ ├── FlowableTakeLastTimedTest.java │ │ ├── FlowableTakeTest.java │ │ ├── FlowableTakeTest2.java │ │ ├── FlowableTakeTimedTest.java │ │ ├── FlowableTakeUntilPredicateTest.java │ │ ├── FlowableTakeUntilTest.java │ │ ├── FlowableTakeWhileTest.java │ │ ├── FlowableThrottleFirstTest.java │ │ ├── FlowableThrottleLatestTest.java │ │ ├── FlowableTimeIntervalTest.java │ │ ├── FlowableTimeoutTests.java │ │ ├── FlowableTimeoutWithSelectorTest.java │ │ ├── FlowableTimerTest.java │ │ ├── FlowableTimestampTest.java │ │ ├── FlowableToCompletableTest.java │ │ ├── FlowableToFutureTest.java │ │ ├── FlowableToListTest.java │ │ ├── FlowableToMapTest.java │ │ ├── FlowableToMultimapTest.java │ │ ├── FlowableToSingleTest.java │ │ ├── FlowableToSortedListTest.java │ │ ├── FlowableUnsubscribeOnTest.java │ │ ├── FlowableUsingTest.java │ │ ├── FlowableWindowWithFlowableTest.java │ │ ├── FlowableWindowWithSizeTest.java │ │ ├── FlowableWindowWithStartEndFlowableTest.java │ │ ├── FlowableWindowWithTimeTest.java │ │ ├── FlowableWithLatestFromTest.java │ │ ├── FlowableZipCompletionTest.java │ │ ├── FlowableZipIterableTest.java │ │ ├── FlowableZipTest.java │ │ └── NotificationLiteTest.java │ ├── maybe │ │ ├── AbstractMaybeWithUpstreamTest.java │ │ ├── MaybeAmbTest.java │ │ ├── MaybeBlockingSubscribeTest.java │ │ ├── MaybeCacheTest.java │ │ ├── MaybeCallbackObserverTest.java │ │ ├── MaybeConcatArrayEagerDelayErrorTest.java │ │ ├── MaybeConcatArrayTest.java │ │ ├── MaybeConcatEagerTest.java │ │ ├── MaybeConcatIterableTest.java │ │ ├── MaybeConcatMapCompletableTest.java │ │ ├── MaybeConcatMapSingleTest.java │ │ ├── MaybeConcatMapTest.java │ │ ├── MaybeConcatPublisherTest.java │ │ ├── MaybeContainsTest.java │ │ ├── MaybeCountTest.java │ │ ├── MaybeCreateTest.java │ │ ├── MaybeDelayOtherTest.java │ │ ├── MaybeDelaySubscriptionTest.java │ │ ├── MaybeDelayTest.java │ │ ├── MaybeDematerializeTest.java │ │ ├── MaybeDetachTest.java │ │ ├── MaybeDoAfterSuccessTest.java │ │ ├── MaybeDoFinallyTest.java │ │ ├── MaybeDoOnEventTest.java │ │ ├── MaybeDoOnLifecycleTest.java │ │ ├── MaybeDoOnTerminateTest.java │ │ ├── MaybeEmptyTest.java │ │ ├── MaybeEqualTest.java │ │ ├── MaybeErrorTest.java │ │ ├── MaybeFilterSingleTest.java │ │ ├── MaybeFlatMapBiSelectorTest.java │ │ ├── MaybeFlatMapCompletableTest.java │ │ ├── MaybeFlatMapIterableFlowableTest.java │ │ ├── MaybeFlatMapIterableObservableTest.java │ │ ├── MaybeFlatMapNotificationTest.java │ │ ├── MaybeFlatMapSingleElementTest.java │ │ ├── MaybeFlatMapSingleTest.java │ │ ├── MaybeFlattenTest.java │ │ ├── MaybeFromActionTest.java │ │ ├── MaybeFromCallableTest.java │ │ ├── MaybeFromCompletableTest.java │ │ ├── MaybeFromFutureTest.java │ │ ├── MaybeFromObservableTest.java │ │ ├── MaybeFromPubisherTest.java │ │ ├── MaybeFromRunnableTest.java │ │ ├── MaybeFromSingleTest.java │ │ ├── MaybeFromSupplierTest.java │ │ ├── MaybeHideTest.java │ │ ├── MaybeIgnoreElementTest.java │ │ ├── MaybeIsEmptySingleTest.java │ │ ├── MaybeIsEmptyTest.java │ │ ├── MaybeJustTest.java │ │ ├── MaybeMapTest.java │ │ ├── MaybeMaterializeTest.java │ │ ├── MaybeMergeArrayTest.java │ │ ├── MaybeMergeTest.java │ │ ├── MaybeMergeWithTest.java │ │ ├── MaybeOfTypeTest.java │ │ ├── MaybeOnErrorXTest.java │ │ ├── MaybePeekTest.java │ │ ├── MaybeSafeSubscribeTest.java │ │ ├── MaybeStartWithTest.java │ │ ├── MaybeSubscribeOnTest.java │ │ ├── MaybeSwitchIfEmptySingleTest.java │ │ ├── MaybeSwitchIfEmptyTest.java │ │ ├── MaybeSwitchOnNextTest.java │ │ ├── MaybeTakeUntilPublisherTest.java │ │ ├── MaybeTakeUntilTest.java │ │ ├── MaybeTimeIntervalTest.java │ │ ├── MaybeTimeoutPublisherTest.java │ │ ├── MaybeTimeoutTest.java │ │ ├── MaybeTimerTest.java │ │ ├── MaybeTimestampTest.java │ │ ├── MaybeToCompletableTest.java │ │ ├── MaybeToFlowableTest.java │ │ ├── MaybeToFutureTest.java │ │ ├── MaybeToObservableTest.java │ │ ├── MaybeToSingleTest.java │ │ ├── MaybeUnsubscribeOnTest.java │ │ ├── MaybeUsingTest.java │ │ ├── MaybeZipArrayTest.java │ │ └── MaybeZipIterableTest.java │ ├── mixed │ │ ├── CompletableAndThenObservableTest.java │ │ ├── CompletableAndThenPublisherTest.java │ │ ├── FlowableConcatMapCompletableTest.java │ │ ├── FlowableConcatMapMaybeTest.java │ │ ├── FlowableConcatMapSingleTest.java │ │ ├── FlowableSwitchMapCompletableTest.java │ │ ├── FlowableSwitchMapMaybeTest.java │ │ ├── FlowableSwitchMapSingleTest.java │ │ ├── MaybeFlatMapObservableTest.java │ │ ├── MaybeFlatMapPublisherTest.java │ │ ├── ObservableConcatMapCompletableTest.java │ │ ├── ObservableConcatMapMaybeTest.java │ │ ├── ObservableConcatMapSingleTest.java │ │ ├── ObservableSwitchMapCompletableTest.java │ │ ├── ObservableSwitchMapMaybeTest.java │ │ ├── ObservableSwitchMapSingleTest.java │ │ ├── ScalarXMapZHelperTest.java │ │ └── SingleFlatMapObservableTest.java │ ├── observable │ │ ├── AbstractObservableWithUpstreamTest.java │ │ ├── BlockingObservableLatestTest.java │ │ ├── BlockingObservableMostRecentTest.java │ │ ├── BlockingObservableNextTest.java │ │ ├── BlockingObservableToFutureTest.java │ │ ├── BlockingObservableToIteratorTest.java │ │ ├── Burst.java │ │ ├── ObservableAllTest.java │ │ ├── ObservableAmbTest.java │ │ ├── ObservableAnyTest.java │ │ ├── ObservableAutoConnectTest.java │ │ ├── ObservableBlockingTest.java │ │ ├── ObservableBufferTest.java │ │ ├── ObservableBufferUntilSubscriberTest.java │ │ ├── ObservableCacheTest.java │ │ ├── ObservableCastTest.java │ │ ├── ObservableCollectTest.java │ │ ├── ObservableCombineLatestTest.java │ │ ├── ObservableConcatMapCompletableTest.java │ │ ├── ObservableConcatMapEagerTest.java │ │ ├── ObservableConcatMapSchedulerTest.java │ │ ├── ObservableConcatMapTest.java │ │ ├── ObservableConcatTest.java │ │ ├── ObservableConcatWithCompletableTest.java │ │ ├── ObservableConcatWithMaybeTest.java │ │ ├── ObservableConcatWithSingleTest.java │ │ ├── ObservableCountTest.java │ │ ├── ObservableCreateTest.java │ │ ├── ObservableDebounceTest.java │ │ ├── ObservableDefaultIfEmptyTest.java │ │ ├── ObservableDeferTest.java │ │ ├── ObservableDelaySubscriptionOtherTest.java │ │ ├── ObservableDelayTest.java │ │ ├── ObservableDematerializeTest.java │ │ ├── ObservableDetachTest.java │ │ ├── ObservableDistinctTest.java │ │ ├── ObservableDistinctUntilChangedTest.java │ │ ├── ObservableDoAfterNextTest.java │ │ ├── ObservableDoFinallyTest.java │ │ ├── ObservableDoOnEachTest.java │ │ ├── ObservableDoOnSubscribeTest.java │ │ ├── ObservableDoOnUnsubscribeTest.java │ │ ├── ObservableElementAtTest.java │ │ ├── ObservableFilterTest.java │ │ ├── ObservableFinallyTest.java │ │ ├── ObservableFirstTest.java │ │ ├── ObservableFlatMapCompletableTest.java │ │ ├── ObservableFlatMapMaybeTest.java │ │ ├── ObservableFlatMapSingleTest.java │ │ ├── ObservableFlatMapTest.java │ │ ├── ObservableFlattenIterableTest.java │ │ ├── ObservableForEachTest.java │ │ ├── ObservableFromActionTest.java │ │ ├── ObservableFromCallableTest.java │ │ ├── ObservableFromCompletableTest.java │ │ ├── ObservableFromIterableTest.java │ │ ├── ObservableFromMaybeTest.java │ │ ├── ObservableFromRunnableTest.java │ │ ├── ObservableFromSingleTest.java │ │ ├── ObservableFromSupplierTest.java │ │ ├── ObservableFromTest.java │ │ ├── ObservableGenerateTest.java │ │ ├── ObservableGroupByTest.java │ │ ├── ObservableGroupJoinTest.java │ │ ├── ObservableHideTest.java │ │ ├── ObservableIgnoreElementsTest.java │ │ ├── ObservableInternalHelperTest.java │ │ ├── ObservableIntervalRangeTest.java │ │ ├── ObservableIntervalTest.java │ │ ├── ObservableJoinTest.java │ │ ├── ObservableLastTest.java │ │ ├── ObservableLiftTest.java │ │ ├── ObservableMapNotificationTest.java │ │ ├── ObservableMapTest.java │ │ ├── ObservableMaterializeTest.java │ │ ├── ObservableMergeDelayErrorTest.java │ │ ├── ObservableMergeMaxConcurrentTest.java │ │ ├── ObservableMergeTest.java │ │ ├── ObservableMergeWithCompletableTest.java │ │ ├── ObservableMergeWithMaybeTest.java │ │ ├── ObservableMergeWithSingleTest.java │ │ ├── ObservableObserveOnTest.java │ │ ├── ObservableOnErrorCompleteTest.java │ │ ├── ObservableOnErrorResumeNextTest.java │ │ ├── ObservableOnErrorResumeWithTest.java │ │ ├── ObservableOnErrorReturnTest.java │ │ ├── ObservablePublishTest.java │ │ ├── ObservableRangeLongTest.java │ │ ├── ObservableRangeTest.java │ │ ├── ObservableRedoTest.java │ │ ├── ObservableReduceTest.java │ │ ├── ObservableRefCountTest.java │ │ ├── ObservableRepeatTest.java │ │ ├── ObservableReplayEagerTruncateTest.java │ │ ├── ObservableReplayTest.java │ │ ├── ObservableResourceWrapperTest.java │ │ ├── ObservableRetryTest.java │ │ ├── ObservableRetryWithPredicateTest.java │ │ ├── ObservableSampleTest.java │ │ ├── ObservableScalarXMapTest.java │ │ ├── ObservableScanTest.java │ │ ├── ObservableSequenceEqualTest.java │ │ ├── ObservableSerializeTest.java │ │ ├── ObservableSingleTest.java │ │ ├── ObservableSkipLastTest.java │ │ ├── ObservableSkipLastTimedTest.java │ │ ├── ObservableSkipTest.java │ │ ├── ObservableSkipTimedTest.java │ │ ├── ObservableSkipUntilTest.java │ │ ├── ObservableSkipWhileTest.java │ │ ├── ObservableStartWithTest.java │ │ ├── ObservableSubscribeOnTest.java │ │ ├── ObservableSwitchIfEmptyTest.java │ │ ├── ObservableSwitchTest.java │ │ ├── ObservableTakeLastOneTest.java │ │ ├── ObservableTakeLastTest.java │ │ ├── ObservableTakeLastTimedTest.java │ │ ├── ObservableTakeTest.java │ │ ├── ObservableTakeTimedTest.java │ │ ├── ObservableTakeUntilPredicateTest.java │ │ ├── ObservableTakeUntilTest.java │ │ ├── ObservableTakeWhileTest.java │ │ ├── ObservableThrottleFirstTest.java │ │ ├── ObservableThrottleLatestTest.java │ │ ├── ObservableTimeIntervalTest.java │ │ ├── ObservableTimeoutTests.java │ │ ├── ObservableTimeoutWithSelectorTest.java │ │ ├── ObservableTimerTest.java │ │ ├── ObservableTimestampTest.java │ │ ├── ObservableToFutureTest.java │ │ ├── ObservableToListTest.java │ │ ├── ObservableToMapTest.java │ │ ├── ObservableToMultimapTest.java │ │ ├── ObservableToSortedListTest.java │ │ ├── ObservableToXTest.java │ │ ├── ObservableUnsubscribeOnTest.java │ │ ├── ObservableUsingTest.java │ │ ├── ObservableWindowWithObservableTest.java │ │ ├── ObservableWindowWithSizeTest.java │ │ ├── ObservableWindowWithStartEndObservableTest.java │ │ ├── ObservableWindowWithTimeTest.java │ │ ├── ObservableWithLatestFromTest.java │ │ ├── ObservableZipCompletionTest.java │ │ ├── ObservableZipIterableTest.java │ │ └── ObservableZipTest.java │ └── single │ │ ├── SingleAmbTest.java │ │ ├── SingleBlockingSubscribeTest.java │ │ ├── SingleCacheTest.java │ │ ├── SingleConcatArrayDelayErrorTest.java │ │ ├── SingleConcatArrayEagerDelayErrorTest.java │ │ ├── SingleConcatDelayErrorTest.java │ │ ├── SingleConcatEagerTest.java │ │ ├── SingleConcatMapCompletableTest.java │ │ ├── SingleConcatMapMaybeTest.java │ │ ├── SingleConcatMapTest.java │ │ ├── SingleConcatPublisherTest.java │ │ ├── SingleConcatTest.java │ │ ├── SingleContainstTest.java │ │ ├── SingleCreateTest.java │ │ ├── SingleDeferTest.java │ │ ├── SingleDelayTest.java │ │ ├── SingleDematerializeTest.java │ │ ├── SingleDetachTest.java │ │ ├── SingleDoAfterSuccessTest.java │ │ ├── SingleDoAfterTerminateTest.java │ │ ├── SingleDoFinallyTest.java │ │ ├── SingleDoOnLifecycleTest.java │ │ ├── SingleDoOnTerminateTest.java │ │ ├── SingleDoOnTest.java │ │ ├── SingleEqualsTest.java │ │ ├── SingleErrorTest.java │ │ ├── SingleFlatMapBiSelectorTest.java │ │ ├── SingleFlatMapCompletableTest.java │ │ ├── SingleFlatMapIterableFlowableTest.java │ │ ├── SingleFlatMapIterableObservableTest.java │ │ ├── SingleFlatMapMaybeTest.java │ │ ├── SingleFlatMapNotificationTest.java │ │ ├── SingleFlatMapTest.java │ │ ├── SingleFromCallableTest.java │ │ ├── SingleFromMaybeTest.java │ │ ├── SingleFromPublisherTest.java │ │ ├── SingleFromSupplierTest.java │ │ ├── SingleFromTest.java │ │ ├── SingleHideTest.java │ │ ├── SingleInternalHelperTest.java │ │ ├── SingleLiftTest.java │ │ ├── SingleMapTest.java │ │ ├── SingleMaterializeTest.java │ │ ├── SingleMergeArrayTest.java │ │ ├── SingleMergeTest.java │ │ ├── SingleMiscTest.java │ │ ├── SingleObserveOnTest.java │ │ ├── SingleOfTypeTest.java │ │ ├── SingleOnErrorCompleteTest.java │ │ ├── SingleOnErrorXTest.java │ │ ├── SingleSafeSubscribeTest.java │ │ ├── SingleStartWithTest.java │ │ ├── SingleSubscribeOnTest.java │ │ ├── SingleSwitchOnNextTest.java │ │ ├── SingleTakeUntilTest.java │ │ ├── SingleTimeIntervalTest.java │ │ ├── SingleTimeoutTest.java │ │ ├── SingleTimerTest.java │ │ ├── SingleTimestampTest.java │ │ ├── SingleToFlowableTest.java │ │ ├── SingleToObservableTest.java │ │ ├── SingleUnsubscribeOnTest.java │ │ ├── SingleUsingTest.java │ │ ├── SingleZipArrayTest.java │ │ ├── SingleZipIterableTest.java │ │ └── SingleZipTest.java ├── schedulers │ ├── AbstractDirectTaskTest.java │ ├── BooleanRunnableTest.java │ ├── ComputationSchedulerInternalTest.java │ ├── DisposeOnCancelTest.java │ ├── ExecutorSchedulerDelayedRunnableTest.java │ ├── ExecutorSchedulerInternalTest.java │ ├── ImmediateThinSchedulerTest.java │ ├── InstantPeriodicTaskTest.java │ ├── InterruptibleRunnableTest.java │ ├── IoScheduledReleaseTest.java │ ├── IoSchedulerInternalTest.java │ ├── RxThreadFactoryTest.java │ ├── ScheduledDirectPeriodicTaskTest.java │ ├── ScheduledRunnableTest.java │ ├── SchedulerMultiWorkerSupportTest.java │ ├── SchedulerPoolFactoryTest.java │ ├── SchedulerWhenTest.java │ ├── SingleSchedulerTest.java │ └── TrampolineSchedulerInternalTest.java ├── subscribers │ ├── BasicFuseableConditionalSubscriberTest.java │ ├── BasicFuseableSubscriberTest.java │ ├── BlockingSubscriberTest.java │ ├── BoundedSubscriberTest.java │ ├── DeferredScalarSubscriberTest.java │ ├── EmptyComponentTest.java │ ├── FlowableConsumersTest.java │ ├── FutureSubscriberTest.java │ ├── InnerQueuedSubscriberTest.java │ ├── LambdaSubscriberTest.java │ ├── QueueDrainSubscriberTest.java │ ├── SinglePostCompleteSubscriberTest.java │ ├── StrictSubscriberTest.java │ └── SubscriberResourceWrapperTest.java ├── subscriptions │ ├── ArrayCompositeSubscriptionTest.java │ ├── AsyncSubscriptionTest.java │ ├── DeferredScalarSubscriptionTest.java │ ├── QueueSubscriptionTest.java │ ├── ScalarSubscriptionTest.java │ ├── SubscriptionArbiterTest.java │ └── SubscriptionHelperTest.java └── util │ ├── AtomicThrowableTest.java │ ├── BackpressureHelperTest.java │ ├── BlockingHelperTest.java │ ├── CrashingIterable.java │ ├── CrashingMappedIterable.java │ ├── EndConsumerHelperTest.java │ ├── ExceptionHelperTest.java │ ├── HalfSerializerObserverTest.java │ ├── HalfSerializerSubscriberTest.java │ ├── JavadocNoThrows.java │ ├── MarbleDimensions.java │ ├── MergerBiFunctionTest.java │ ├── MiscUtilTest.java │ ├── NotificationLiteTest.java │ ├── ObservableToFlowabeTestSync.java │ ├── OpenHashSetTest.java │ ├── OperatorArgumentNaming.java │ ├── OperatorMatrixGenerator.java │ ├── QueueDrainHelperTest.java │ ├── TestingHelper.java │ └── VolatileSizeArrayListTest.java ├── maybe ├── MaybeCreateTest.java ├── MaybeRetryTest.java ├── MaybeTest.java └── MaybeTimerTest.java ├── observable ├── ObservableCombineLatestTests.java ├── ObservableConcatTests.java ├── ObservableCovarianceTest.java ├── ObservableDoOnTest.java ├── ObservableErrorHandlingTests.java ├── ObservableEventStream.java ├── ObservableFuseableTest.java ├── ObservableGroupByTests.java ├── ObservableMergeTests.java ├── ObservableNullTests.java ├── ObservableReduceTests.java ├── ObservableScanTests.java ├── ObservableStartWithTests.java ├── ObservableSubscriberTest.java ├── ObservableTest.java ├── ObservableThrottleLastTests.java ├── ObservableThrottleWithTimeoutTests.java ├── ObservableWindowTests.java └── ObservableZipTests.java ├── observers ├── DisposableCompletableObserverTest.java ├── DisposableMaybeObserverTest.java ├── DisposableObserverTest.java ├── DisposableSingleObserverTest.java ├── ResourceCompletableObserverTest.java ├── ResourceMaybeObserverTest.java ├── ResourceObserverTest.java ├── ResourceSingleObserverTest.java ├── SafeObserverTest.java ├── SerializedObserverTest.java └── TestObserverTest.java ├── operators └── SimpleQueueTest.java ├── parallel ├── ParallelCollectTest.java ├── ParallelDoOnNextTryTest.java ├── ParallelFilterTest.java ├── ParallelFilterTryTest.java ├── ParallelFlatMapIterableTest.java ├── ParallelFlowableTest.java ├── ParallelFromPublisherTest.java ├── ParallelInvalid.java ├── ParallelJoinTest.java ├── ParallelMapTest.java ├── ParallelMapTryTest.java ├── ParallelPeekTest.java ├── ParallelReduceFullTest.java ├── ParallelReduceTest.java ├── ParallelRunOnTest.java └── ParallelSortedJoinTest.java ├── plugins └── RxJavaPluginsTest.java ├── processors ├── AsyncProcessorTest.java ├── BehaviorProcessorTest.java ├── FlowableProcessorTest.java ├── MulticastProcessorTest.java ├── PublishProcessorTest.java ├── ReplayProcessorBoundedConcurrencyTest.java ├── ReplayProcessorConcurrencyTest.java ├── ReplayProcessorTest.java ├── SerializedProcessorTest.java └── UnicastProcessorTest.java ├── schedulers ├── AbstractSchedulerConcurrencyTests.java ├── AbstractSchedulerTests.java ├── CachedThreadSchedulerTest.java ├── ComputationSchedulerTests.java ├── ExecutorSchedulerFairTest.java ├── ExecutorSchedulerInterruptibleTest.java ├── ExecutorSchedulerTest.java ├── FailOnBlockingTest.java ├── NewThreadSchedulerTest.java ├── SchedulerLifecycleTest.java ├── SchedulerTest.java ├── SchedulerTestHelper.java ├── SchedulerWorkerTest.java ├── TestSchedulerTest.java ├── TimedTest.java └── TrampolineSchedulerTest.java ├── single ├── SingleCacheTest.java ├── SingleNullTests.java ├── SingleRetryTest.java ├── SingleSubscribeTest.java ├── SingleTest.java └── SingleTimerTest.java ├── subjects ├── AsyncSubjectTest.java ├── BehaviorSubjectTest.java ├── CompletableSubjectTest.java ├── MaybeSubjectTest.java ├── PublishSubjectTest.java ├── ReplaySubjectBoundedConcurrencyTest.java ├── ReplaySubjectConcurrencyTest.java ├── ReplaySubjectTest.java ├── SerializedSubjectTest.java ├── SingleSubjectTest.java ├── SubjectTest.java └── UnicastSubjectTest.java ├── subscribers ├── DefaultSubscriberTest.java ├── DisposableSubscriberTest.java ├── ResourceSubscriberTest.java ├── SafeSubscriberTest.java ├── SerializedSubscriberTest.java └── TestSubscriberTest.java ├── tck ├── AllTckTest.java ├── AmbArrayTckTest.java ├── AmbTckTest.java ├── AnyTckTest.java ├── AsyncProcessorAsPublisherTckTest.java ├── BaseTck.java ├── BehaviorProcessorAsPublisherTckTest.java ├── BufferBoundaryTckTest.java ├── BufferExactSizeTckTest.java ├── CacheTckTest.java ├── CollectTckTest.java ├── CombineLatestArrayDelayErrorTckTest.java ├── CombineLatestArrayTckTest.java ├── CombineLatestIterableDelayErrorTckTest.java ├── CombineLatestIterableTckTest.java ├── CompletableAndThenPublisherTckTest.java ├── ConcatArrayEagerTckTest.java ├── ConcatIterableEagerTckTest.java ├── ConcatMapIterableTckTest.java ├── ConcatMapMaybeTckTest.java ├── ConcatMapSingleTckTest.java ├── ConcatMapTckTest.java ├── ConcatPublisherEagerTckTest.java ├── ConcatPublisherTckTest.java ├── ConcatTckTest.java ├── ConcatWithCompletableTckTest.java ├── ConcatWithMaybeEmptyTckTest.java ├── ConcatWithMaybeTckTest.java ├── ConcatWithSingleTckTest.java ├── CreateTckTest.java ├── DefaultIfEmptyTckTest.java ├── DeferTckTest.java ├── DelaySubscriptionTckTest.java ├── DelayTckTest.java ├── DistinctTckTest.java ├── DistinctUntilChangedTckTest.java ├── DoAfterNextTckTest.java ├── DoFinallyTckTest.java ├── DoOnNextTckTest.java ├── ElementAtTckTest.java ├── EmptyTckTest.java ├── FilterTckTest.java ├── FirstTckTest.java ├── FlatMapTckTest.java ├── FromArrayTckTest.java ├── FromCallableTckTest.java ├── FromFutureTckTest.java ├── FromIterableTckTest.java ├── FromSupplierTckTest.java ├── GenerateTckTest.java ├── GroupByTckTest.java ├── HideTckTest.java ├── IgnoreElementsTckTest.java ├── IntervalRangeTckTest.java ├── IntervalTckTest.java ├── IsEmptyTckTest.java ├── JustTckTest.java ├── LastTckTest.java ├── LimitTckTest.java ├── MapTckTest.java ├── MaybeFlatMapPublisherTckTest.java ├── MergeIterableTckTest.java ├── MergePublisherTckTest.java ├── MergeTckTest.java ├── MergeWithCompletableTckTest.java ├── MergeWithMaybeEmptyTckTest.java ├── MergeWithMaybeTckTest.java ├── MergeWithSingleTckTest.java ├── MulticastProcessorAsPublisherTckTest.java ├── MulticastProcessorRefCountedTckTest.java ├── MulticastProcessorTckTest.java ├── ObserveOnTckTest.java ├── OnBackpressureBufferTckTest.java ├── OnErrorResumeWithTckTest.java ├── OnErrorReturnItemTckTest.java ├── PublishProcessorAsPublisherTckTest.java ├── PublishSelectorTckTest.java ├── PublishTckTest.java ├── RangeTckTest.java ├── RebatchRequestsTckTest.java ├── ReduceTckTest.java ├── ReduceWithTckTest.java ├── RefCountProcessor.java ├── RepeatTckTest.java ├── ReplayProcessorSizeBoundAsPublisherTckTest.java ├── ReplayProcessorTimeBoundAsPublisherTckTest.java ├── ReplayProcessorUnboundedAsPublisherTckTest.java ├── ReplaySelectorTckTest.java ├── ReplayTckTest.java ├── RetryTckTest.java ├── ScanTckTest.java ├── SequenceEqualTckTest.java ├── ShareTckTest.java ├── SingleFlatMapFlowableTckTest.java ├── SingleTckTest.java ├── SkipLastTckTest.java ├── SkipTckTest.java ├── SkipUntilTckTest.java ├── SkipWhileTckTest.java ├── SortedTckTest.java ├── SubscribeOnTckTest.java ├── SwitchIfEmptyTckTest.java ├── SwitchMapDelayErrorTckTest.java ├── SwitchMapTckTest.java ├── SwitchOnNextTckTest.java ├── TakeLastTckTest.java ├── TakeTckTest.java ├── TakeUntilTckTest.java ├── TakeWhileTckTest.java ├── TimeIntervalTckTest.java ├── TimeoutTckTest.java ├── TimerTckTest.java ├── TimestampTckTest.java ├── ToListTckTest.java ├── ToMapTckTest.java ├── ToMultimapTckTest.java ├── ToSortedListTckTest.java ├── UnicastProcessorAsPublisherTckTest.java ├── UnicastProcessorTckTest.java ├── UnsubscribeOnTckTest.java ├── UsingTckTest.java ├── WindowBoundaryTckTest.java ├── WindowExactSizeTckTest.java ├── WithLatestFromTckTest.java ├── ZipIterableTckTest.java ├── ZipTckTest.java ├── ZipWithIterableTckTest.java └── ZipWithTckTest.java ├── testsupport ├── BaseTestConsumerEx.java ├── SuppressUndeliverable.java ├── SuppressUndeliverableRule.java ├── TestHelper.java ├── TestObserverEx.java ├── TestObserverExTest.java ├── TestSubscriberEx.java ├── TestSubscriberExTest.java └── TimesteppingScheduler.java └── validators ├── BaseTypeAnnotations.java ├── BaseTypeParser.java ├── CatchThrowIfFatalCheck.java ├── CheckLocalVariablesInTests.java ├── FixLicenseHeaders.java ├── InternalWrongNaming.java ├── JavadocCodesAndLinks.java ├── JavadocFindUnescapedAngleBrackets.java ├── JavadocForAnnotations.java ├── JavadocWording.java ├── MaybeNo2Dot0Since.java ├── NewLinesBeforeAnnotation.java ├── NoAnonymousInnerClassesTest.java ├── NonNullMethodTypeArgumentCheck.java ├── OperatorsAreFinal.java ├── OperatorsUseInterfaces.java ├── ParamValidationCheckerTest.java ├── ParamValidationNaming.java ├── ParameterNamesInClassesTest.java ├── PublicFinalMethods.java ├── SourceAnnotationCheck.java ├── TestPrefixInMethodName.java ├── TextualAorAn.java └── TooManyEmptyNewLines.java /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files we want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.java text 7 | *.groovy text 8 | *.scala text 9 | *.clj text 10 | *.txt text 11 | *.md text 12 | 13 | # Denote all files that are truly binary and should not be modified. 14 | *.png binary 15 | *.jpg binary 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thanks for using RxJava but before you post an issue, please consider the following points: 2 | 3 | - [ ] Please include the library version number, including the minor and patch version, in the issue text. In addition, if you'd include the major version in the title (such as `3.x`) that would be great. 4 | 5 | - [ ] If you think you found a bug, please include a code sample that reproduces the problem. Dumping a stacktrace is usually not enough for us. 6 | 7 | - [ ] RxJava has more than 150 operators, we recommend searching the [javadoc](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/Observable.html) for keywords of what you try to accomplish. 8 | 9 | - [ ] If you have a question/issue about a library/technology built on top of RxJava (such as Retrofit, RxNetty, etc.), please consider asking a question on StackOverflow first (then maybe on their issue list). 10 | 11 | - [ ] Questions like "how do I X with RxJava" are generally better suited for StackOverflow (where it may already have an answer). 12 | 13 | - [ ] Please avoid cross-posting questions on StackOverflow, this issue list, the Gitter room or the mailing list. -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thank you for contributing to RxJava. Before pressing the "Create Pull Request" button, please consider the following points: 2 | 3 | - [ ] Please give a description about what and why you are contributing, even if it's trivial. 4 | 5 | - [ ] Please include the issue list number(s) or other PR numbers in the description if you are contributing in response to those. 6 | 7 | - [ ] Please include a reasonable set of unit tests if you contribute new code or change an existing one. If you contribute an operator, (if applicable) please make sure you have tests for working with an `empty`, `just`, `range` of values as well as an `error` source, with and/or without backpressure and see if unsubscription/cancellation propagates correctly. 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | 9 | - package-ecosystem: "gradle" 10 | directory: "/" 11 | schedule: 12 | interval: "daily" 13 | -------------------------------------------------------------------------------- /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: "Validate Gradle Wrapper" 2 | on: [push, pull_request] 3 | 4 | permissions: 5 | contents: read 6 | 7 | jobs: 8 | validation: 9 | name: "Validation" 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 13 | - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 14 | -------------------------------------------------------------------------------- /.github/workflows/gradle_pr.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Gradle 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle 3 | 4 | name: Pull Request 5 | 6 | on: 7 | pull_request: 8 | branches: [ 3.x ] 9 | 10 | permissions: 11 | contents: read 12 | 13 | jobs: 14 | build: 15 | 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 19 | - name: Set up JDK 11 20 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 21 | with: 22 | distribution: 'zulu' 23 | java-version: '11' 24 | - name: Cache Gradle packages 25 | uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 26 | with: 27 | path: ~/.gradle/caches 28 | key: ${{ runner.os }}-gradle-1-${{ hashFiles('**/*.gradle') }} 29 | restore-keys: ${{ runner.os }}-gradle-1- 30 | - name: Grant execute permission for gradlew 31 | run: chmod +x gradlew 32 | - name: Build RxJava 33 | run: ./gradlew build --stacktrace 34 | - name: Upload to Codecov 35 | uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 36 | - name: Generate Javadoc 37 | run: ./gradlew javadoc --stacktrace 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | # it's better to unpack these files and commit the raw source 13 | # git has its own built in compression methods 14 | *.7z 15 | *.dmg 16 | *.gz 17 | *.iso 18 | *.jar 19 | *.rar 20 | *.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | 27 | # OS generated files # 28 | ###################### 29 | .DS_Store* 30 | ehthumbs.db 31 | Icon? 32 | Thumbs.db 33 | 34 | # Editor Files # 35 | ################ 36 | *~ 37 | *.swp 38 | 39 | # Gradle Files # 40 | ################ 41 | .gradle 42 | .gradletasknamecache 43 | .m2 44 | 45 | # Build output directies 46 | target/ 47 | build/ 48 | 49 | # IntelliJ specific files/directories 50 | out 51 | .idea 52 | *.ipr 53 | *.iws 54 | *.iml 55 | atlassian-ide-plugin.xml 56 | 57 | # Eclipse specific files/directories 58 | .classpath 59 | .project 60 | .settings 61 | .metadata 62 | bin/ 63 | 64 | # NetBeans specific files/directories 65 | .nbattrs 66 | /.nb-gradle/profiles/private/ 67 | .nb-gradle-properties 68 | 69 | # Scala build 70 | *.cache 71 | /.nb-gradle/private/ 72 | 73 | # PMD files 74 | .pmd 75 | .ruleset 76 | test-output/ 77 | 78 | # Checkstyle local config 79 | .checkstyle 80 | 81 | # Some editor's config 82 | .editorconfig 83 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to RxJava 3.x 2 | 3 | If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request targeting the branch `3.x`. 4 | 5 | When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. 6 | 7 | ## License 8 | 9 | By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/ReactiveX/RxJava/blob/3.x/LICENSE 10 | 11 | All files are released with the Apache 2.0 license. 12 | 13 | If you are adding a new file it should have a header like this: 14 | 15 | ``` 16 | /* 17 | * Copyright (c) 2016-present, RxJava Contributors. 18 | * 19 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 20 | * compliance with the License. You may obtain a copy of the License at 21 | * 22 | * http://www.apache.org/licenses/LICENSE-2.0 23 | * 24 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 25 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 26 | * the License for the specific language governing permissions and limitations under the License. 27 | */ 28 | ``` 29 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016-present, RxJava Contributors. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. 4 | 5 | Please disclose it at [security advisory](https://github.com/ReactiveX/RxJava/security/advisories/new). 6 | 7 | This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure. 8 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: 95% 6 | threshold: 1% 7 | 8 | patch: 9 | default: 10 | target: 95% 11 | threshold: 1% 12 | 13 | changes: no 14 | -------------------------------------------------------------------------------- /config/checkstyle/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /config/checkstyle/suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /config/license/HEADER: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016-present, RxJava Contributors. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 4 | compliance with the License. You may obtain a copy of the License at 5 | 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | 8 | Unless required by applicable law or agreed to in writing, software distributed under the License is 9 | distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 10 | the License for the specific language governing permissions and limitations under the License. 11 | -------------------------------------------------------------------------------- /config/license/HEADER_JAVA: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /docs/Observable.md: -------------------------------------------------------------------------------- 1 | In RxJava an object that implements the _Observer_ interface _subscribes_ to an object of the _Observable_ class. Then that subscriber reacts to whatever item or sequence of items the Observable object _emits_. This pattern facilitates concurrent operations because it does not need to block while waiting for the Observable to emit objects, but instead it creates a sentry in the form of a subscriber that stands ready to react appropriately at whatever future time the Observable does so. 2 | 3 | For information about the Observable class, see [the Observable documentation page at ReactiveX.io](http://reactivex.io/documentation/observable.html). -------------------------------------------------------------------------------- /docs/Scheduler.md: -------------------------------------------------------------------------------- 1 | If you want to introduce multithreading into your cascade of Observable operators, you can do so by instructing those operators (or particular Observables) to operate on particular Schedulers. 2 | 3 | For more information about Schedulers, see [the ReactiveX `Scheduler` documentation page](http://reactivex.io/documentation/scheduler.html). -------------------------------------------------------------------------------- /docs/Subject.md: -------------------------------------------------------------------------------- 1 | A `Subject` is a sort of bridge or proxy that acts both as an `Subscriber` and as an `Observable`. Because it is a Subscriber, it can subscribe to one or more Observables, and because it is an Observable, it can pass through the items it observes by reemitting them, and it can also emit new items. 2 | 3 | For more information about the varieties of Subject and how to use them, see [the ReactiveX `Subject` documentation](http://reactivex.io/documentation/subject.html). 4 | 5 | #### Serializing 6 | When you use a Subject as a Subscriber, take care not to call its `onNext( )` method (or its other `on` methods) from multiple threads, as this could lead to non-serialized calls, which violates the Observable contract and creates an ambiguity in the resulting Subject. 7 | 8 | To protect a Subject from this danger, you can convert it into a [`SerializedSubject`](http://reactivex.io/RxJava/javadoc/rx/subjects/SerializedSubject.html) with code like the following: 9 | 10 | ```java 11 | mySafeSubject = new SerializedSubject( myUnsafeSubject ); 12 | ``` 13 | -------------------------------------------------------------------------------- /docs/The-RxJava-Android-Module.md: -------------------------------------------------------------------------------- 1 | ## RxAndroid 2 | 3 | See the [RxAndroid](https://github.com/ReactiveX/RxAndroid) project page and the [the RxAndroid wiki](https://github.com/ReactiveX/RxAndroid/wiki) for details. 4 | -------------------------------------------------------------------------------- /docs/_Footer.md: -------------------------------------------------------------------------------- 1 | **Copyright (c) 2016-present, RxJava Contributors.** 2 | [Twitter @RxJava](https://twitter.com/#!/RxJava) | [Gitter @RxJava](https://gitter.im/ReactiveX/RxJava) 3 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | group=io.reactivex.rxjava3 2 | version=3.0.0-SNAPSHOT 3 | description=RxJava: Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM. 4 | 5 | POM_ARTIFACT_ID=rxjava 6 | POM_NAME=RxJava 7 | POM_PACKAGING=jar 8 | 9 | POM_DESCRIPTION=Reactive Extensions for Java 10 | POM_INCEPTION_YEAR=2013 11 | 12 | POM_URL=https://github.com/ReactiveX/RxJava 13 | POM_SCM_URL=https://github.com/ReactiveX/RxJava 14 | POM_SCM_CONNECTION=scm:git:git://github.com/ReactiveX/RxJava.git 15 | POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/ReactiveX/RxJava.git 16 | 17 | POM_LICENCE_NAME=The Apache Software License, Version 2.0 18 | POM_LICENCE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt 19 | POM_LICENCE_DIST=repo 20 | 21 | POM_DEVELOPER_ID=akarnokd 22 | POM_DEVELOPER_NAME=David Karnok 23 | POM_DEVELOPER_URL=https://github.com/akarnokd/ 24 | POM_DEVELOPER_EMAIL=akarnokd@gmail.com 25 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ReactiveX/RxJava/c8c5399bf62b7186b49c04792691c3fc341bfc6c/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name='rxjava' 2 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/annotations/BackpressureSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.annotations; 15 | 16 | import java.lang.annotation.*; 17 | 18 | /** 19 | * Indicates the backpressure support kind of the associated operator or class. 20 | * @since 2.0 21 | */ 22 | @Retention(RetentionPolicy.RUNTIME) 23 | @Documented 24 | @Target({ElementType.METHOD, ElementType.TYPE}) 25 | public @interface BackpressureSupport { 26 | /** 27 | * The backpressure supported by this method or class. 28 | * @return backpressure supported by this method or class. 29 | */ 30 | BackpressureKind value(); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/annotations/Beta.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.annotations; 15 | 16 | /** 17 | * Indicates the feature is in beta state: it will be most likely stay but 18 | * the signature may change between versions without warning. 19 | */ 20 | public @interface Beta { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/annotations/CheckReturnValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.annotations; 15 | 16 | import java.lang.annotation.*; 17 | 18 | /** 19 | * Marks methods whose return values should be checked. 20 | *

History: 2.0.2 - experimental 21 | * @since 2.1 22 | */ 23 | @Retention(RetentionPolicy.RUNTIME) 24 | @Documented 25 | @Target(ElementType.METHOD) 26 | public @interface CheckReturnValue { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/annotations/Experimental.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.annotations; 15 | 16 | /** 17 | * Indicates the feature is in experimental state: its existence, signature or behavior 18 | * might change without warning from one release to the next. 19 | */ 20 | public @interface Experimental { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/annotations/NonNull.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.annotations; 15 | 16 | import static java.lang.annotation.ElementType.*; 17 | import static java.lang.annotation.RetentionPolicy.CLASS; 18 | 19 | import java.lang.annotation.*; 20 | 21 | /** 22 | * Indicates that a field/parameter/variable/type parameter/return type is never null. 23 | */ 24 | @Documented 25 | @Target(value = {FIELD, METHOD, PARAMETER, LOCAL_VARIABLE, TYPE_PARAMETER, TYPE_USE}) 26 | @Retention(value = CLASS) 27 | public @interface NonNull { } 28 | 29 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/annotations/Nullable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.annotations; 15 | 16 | import static java.lang.annotation.ElementType.*; 17 | import static java.lang.annotation.RetentionPolicy.CLASS; 18 | 19 | import java.lang.annotation.*; 20 | 21 | /** 22 | * Indicates that a field/parameter/variable/type parameter/return type may be null. 23 | */ 24 | @Documented 25 | @Target(value = {FIELD, METHOD, PARAMETER, LOCAL_VARIABLE, TYPE_PARAMETER, TYPE_USE}) 26 | @Retention(value = CLASS) 27 | public @interface Nullable { } 28 | 29 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/annotations/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Annotations for indicating operator behavior, API stability 16 | * ({@link io.reactivex.rxjava3.annotations.Experimental @Experimental} and {@link io.reactivex.rxjava3.annotations.Beta @Beta}) and 17 | * nullability indicators ({@link io.reactivex.rxjava3.annotations.Nullable Nullable} and {@link io.reactivex.rxjava3.annotations.NonNull NonNull}). 18 | */ 19 | package io.reactivex.rxjava3.annotations; 20 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/core/BackpressureOverflowStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.core; 15 | 16 | /** 17 | * Options to deal with buffer overflow when using onBackpressureBuffer. 18 | */ 19 | public enum BackpressureOverflowStrategy { 20 | /** 21 | * Signal a {@link io.reactivex.rxjava3.exceptions.MissingBackpressureException MissingBackpressureException} 22 | * and terminate the sequence. 23 | */ 24 | ERROR, 25 | /** Drop the oldest value from the buffer. */ 26 | DROP_OLDEST, 27 | /** Drop the latest value from the buffer. */ 28 | DROP_LATEST 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/disposables/SubscriptionDisposable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.disposables; 15 | 16 | import org.reactivestreams.Subscription; 17 | 18 | import io.reactivex.rxjava3.annotations.NonNull; 19 | 20 | /** 21 | * A Disposable container that handles a {@link Subscription}. 22 | */ 23 | final class SubscriptionDisposable extends ReferenceDisposable { 24 | 25 | private static final long serialVersionUID = -707001650852963139L; 26 | 27 | SubscriptionDisposable(Subscription value) { 28 | super(value); 29 | } 30 | 31 | @Override 32 | protected void onDisposed(@NonNull Subscription value) { 33 | value.cancel(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/disposables/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Default implementations for {@link io.reactivex.rxjava3.disposables.Disposable Disposable}-based resource management 16 | * ({@code Disposable} container types) and utility classes to construct 17 | * {@link io.reactivex.rxjava3.disposables.Disposable Disposables} from callbacks and other types. 18 | */ 19 | package io.reactivex.rxjava3.disposables; 20 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/exceptions/ProtocolViolationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.exceptions; 15 | 16 | /** 17 | * Explicitly named exception to indicate a Reactive-Streams 18 | * protocol violation. 19 | *

History: 2.0.6 - experimental; 2.1 - beta 20 | * @since 2.2 21 | */ 22 | public final class ProtocolViolationException extends IllegalStateException { 23 | 24 | private static final long serialVersionUID = 1644750035281290266L; 25 | 26 | /** 27 | * Creates an instance with the given message. 28 | * @param message the message 29 | */ 30 | public ProtocolViolationException(String message) { 31 | super(message); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/exceptions/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Exception handling utilities ({@link io.reactivex.rxjava3.exceptions.Exceptions Exceptions}), 16 | * composite exception container ({@link io.reactivex.rxjava3.exceptions.CompositeException CompositeException}) and 17 | * various lifecycle-related ({@link io.reactivex.rxjava3.exceptions.MissingBackpressureException UndeliverableException}) 18 | * and behavior-violation exception types ({@link io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException OnErrorNotImplementedException}, 19 | * {@link io.reactivex.rxjava3.exceptions.MissingBackpressureException MissingBackpressureException}). 20 | */ 21 | package io.reactivex.rxjava3.exceptions; 22 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/flowables/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Classes supporting the Flowable base reactive class: 16 | * {@link io.reactivex.rxjava3.flowables.ConnectableFlowable} and 17 | * {@link io.reactivex.rxjava3.flowables.GroupedFlowable}. 18 | */ 19 | package io.reactivex.rxjava3.flowables; 20 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/functions/Action.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.functions; 15 | 16 | /** 17 | * A functional interface similar to Runnable but allows throwing a checked exception. 18 | */ 19 | @FunctionalInterface 20 | public interface Action { 21 | /** 22 | * Runs the action and optionally throws a checked exception. 23 | * @throws Throwable if the implementation wishes to throw any type of exception 24 | */ 25 | void run() throws Throwable; 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/functions/BooleanSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.functions; 15 | 16 | /** 17 | * A functional interface (callback) that returns a boolean value. 18 | */ 19 | @FunctionalInterface 20 | public interface BooleanSupplier { 21 | /** 22 | * Returns a boolean value. 23 | * @return a boolean value 24 | * @throws Throwable if the implementation wishes to throw any type of exception 25 | */ 26 | boolean getAsBoolean() throws Throwable; // NOPMD 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/functions/Cancellable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.functions; 15 | 16 | /** 17 | * A functional interface that has a single cancel method 18 | * that can throw. 19 | */ 20 | @FunctionalInterface 21 | public interface Cancellable { 22 | 23 | /** 24 | * Cancel the action or free a resource. 25 | * @throws Throwable if the implementation wishes to throw any type of exception 26 | */ 27 | void cancel() throws Throwable; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/functions/Consumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.functions; 15 | 16 | import io.reactivex.rxjava3.annotations.NonNull; 17 | 18 | /** 19 | * A functional interface (callback) that accepts a single value. 20 | * @param the value type 21 | */ 22 | @FunctionalInterface 23 | public interface Consumer<@NonNull T> { 24 | /** 25 | * Consume the given value. 26 | * @param t the value 27 | * @throws Throwable if the implementation wishes to throw any type of exception 28 | */ 29 | void accept(T t) throws Throwable; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/functions/IntFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.functions; 15 | 16 | import io.reactivex.rxjava3.annotations.NonNull; 17 | 18 | /** 19 | * A functional interface (callback) that takes a primitive value and return value of type T. 20 | * @param the returned value type 21 | */ 22 | @FunctionalInterface 23 | public interface IntFunction<@NonNull T> { 24 | /** 25 | * Calculates a value based on a primitive integer input. 26 | * @param i the input value 27 | * @return the result Object 28 | * @throws Throwable if the implementation wishes to throw any type of exception 29 | */ 30 | T apply(int i) throws Throwable; 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/functions/LongConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.functions; 15 | 16 | /** 17 | * A functional interface (callback) that consumes a primitive long value. 18 | */ 19 | @FunctionalInterface 20 | public interface LongConsumer { 21 | /** 22 | * Consume a primitive long input. 23 | * @param t the primitive long value 24 | * @throws Throwable if the implementation wishes to throw any type of exception 25 | */ 26 | void accept(long t) throws Throwable; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/functions/Predicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.functions; 15 | 16 | import io.reactivex.rxjava3.annotations.NonNull; 17 | 18 | /** 19 | * A functional interface (callback) that returns true or false for the given input value. 20 | * @param the first value 21 | */ 22 | @FunctionalInterface 23 | public interface Predicate<@NonNull T> { 24 | /** 25 | * Test the given input value and return a boolean. 26 | * @param t the value 27 | * @return the boolean result 28 | * @throws Throwable if the implementation wishes to throw any type of exception 29 | */ 30 | boolean test(T t) throws Throwable; 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/functions/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Functional interfaces of functions and actions of arity 0 to 9 and related 16 | * utility classes. 17 | */ 18 | package io.reactivex.rxjava3.functions; 19 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/fuseable/HasUpstreamCompletableSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.fuseable; 15 | 16 | import io.reactivex.rxjava3.annotations.NonNull; 17 | import io.reactivex.rxjava3.core.CompletableSource; 18 | 19 | /** 20 | * Interface indicating the implementor has an upstream CompletableSource-like source available 21 | * via {@link #source()} method. 22 | */ 23 | public interface HasUpstreamCompletableSource { 24 | /** 25 | * Returns the upstream source of this Completable. 26 | *

Allows discovering the chain of observables. 27 | * @return the source CompletableSource 28 | */ 29 | @NonNull 30 | CompletableSource source(); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/fuseable/HasUpstreamMaybeSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.fuseable; 15 | 16 | import io.reactivex.rxjava3.annotations.NonNull; 17 | import io.reactivex.rxjava3.core.MaybeSource; 18 | 19 | /** 20 | * Interface indicating the implementor has an upstream MaybeSource-like source available 21 | * via {@link #source()} method. 22 | * 23 | * @param the value type 24 | */ 25 | public interface HasUpstreamMaybeSource<@NonNull T> { 26 | /** 27 | * Returns the upstream source of this Maybe. 28 | *

Allows discovering the chain of observables. 29 | * @return the source MaybeSource 30 | */ 31 | @NonNull 32 | MaybeSource source(); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/fuseable/HasUpstreamSingleSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.fuseable; 15 | 16 | import io.reactivex.rxjava3.annotations.NonNull; 17 | import io.reactivex.rxjava3.core.SingleSource; 18 | 19 | /** 20 | * Interface indicating the implementor has an upstream SingleSource-like source available 21 | * via {@link #source()} method. 22 | * 23 | * @param the value type 24 | */ 25 | public interface HasUpstreamSingleSource<@NonNull T> { 26 | /** 27 | * Returns the upstream source of this Single. 28 | *

Allows discovering the chain of observables. 29 | * @return the source SingleSource 30 | */ 31 | @NonNull 32 | SingleSource source(); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/fuseable/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Base interfaces and types for supporting operator-fusion. 16 | */ 17 | package io.reactivex.rxjava3.internal.fuseable; 18 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/observers/BlockingLastObserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.observers; 15 | 16 | /** 17 | * Blocks until the upstream signals its last value or completes. 18 | * 19 | * @param the value type 20 | */ 21 | public final class BlockingLastObserver extends BlockingBaseObserver { 22 | 23 | @Override 24 | public void onNext(T t) { 25 | value = t; 26 | } 27 | 28 | @Override 29 | public void onError(Throwable t) { 30 | value = null; 31 | error = t; 32 | countDown(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/observers/InnerQueuedObserverSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.observers; 15 | 16 | /** 17 | * Interface to allow the InnerQueuedSubscriber to call back a parent 18 | * with signals. 19 | * 20 | * @param the value type 21 | */ 22 | public interface InnerQueuedObserverSupport { 23 | 24 | void innerNext(InnerQueuedObserver inner, T value); 25 | 26 | void innerError(InnerQueuedObserver inner, Throwable e); 27 | 28 | void innerComplete(InnerQueuedObserver inner); 29 | 30 | void drain(); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/completable/CompletableEmpty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.completable; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | import io.reactivex.rxjava3.internal.disposables.EmptyDisposable; 18 | 19 | public final class CompletableEmpty extends Completable { 20 | public static final Completable INSTANCE = new CompletableEmpty(); 21 | 22 | private CompletableEmpty() { 23 | } 24 | 25 | @Override 26 | public void subscribeActual(CompletableObserver observer) { 27 | EmptyDisposable.complete(observer); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/completable/CompletableError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.completable; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | import io.reactivex.rxjava3.internal.disposables.EmptyDisposable; 18 | 19 | public final class CompletableError extends Completable { 20 | 21 | final Throwable error; 22 | 23 | public CompletableError(Throwable error) { 24 | this.error = error; 25 | } 26 | 27 | @Override 28 | protected void subscribeActual(CompletableObserver observer) { 29 | EmptyDisposable.error(error, observer); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/completable/CompletableFromUnsafeSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.completable; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | 18 | public final class CompletableFromUnsafeSource extends Completable { 19 | 20 | final CompletableSource source; 21 | 22 | public CompletableFromUnsafeSource(CompletableSource source) { 23 | this.source = source; 24 | } 25 | 26 | @Override 27 | protected void subscribeActual(CompletableObserver observer) { 28 | source.subscribe(observer); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/completable/CompletableNever.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.completable; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | import io.reactivex.rxjava3.internal.disposables.EmptyDisposable; 18 | 19 | public final class CompletableNever extends Completable { 20 | public static final Completable INSTANCE = new CompletableNever(); 21 | 22 | private CompletableNever() { 23 | } 24 | 25 | @Override 26 | protected void subscribeActual(CompletableObserver observer) { 27 | observer.onSubscribe(EmptyDisposable.NEVER); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableFromPublisher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.flowable; 15 | 16 | import org.reactivestreams.*; 17 | 18 | import io.reactivex.rxjava3.core.Flowable; 19 | 20 | public final class FlowableFromPublisher extends Flowable { 21 | final Publisher publisher; 22 | 23 | public FlowableFromPublisher(Publisher publisher) { 24 | this.publisher = publisher; 25 | } 26 | 27 | @Override 28 | protected void subscribeActual(Subscriber s) { 29 | publisher.subscribe(s); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableNever.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.flowable; 15 | 16 | import org.reactivestreams.Subscriber; 17 | 18 | import io.reactivex.rxjava3.core.Flowable; 19 | import io.reactivex.rxjava3.internal.subscriptions.EmptySubscription; 20 | 21 | public final class FlowableNever extends Flowable { 22 | public static final Flowable INSTANCE = new FlowableNever(); 23 | 24 | private FlowableNever() { 25 | } 26 | 27 | @Override 28 | public void subscribeActual(Subscriber s) { 29 | s.onSubscribe(EmptySubscription.INSTANCE); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableSerialized.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.flowable; 15 | 16 | import org.reactivestreams.Subscriber; 17 | 18 | import io.reactivex.rxjava3.core.Flowable; 19 | import io.reactivex.rxjava3.subscribers.SerializedSubscriber; 20 | 21 | public final class FlowableSerialized extends AbstractFlowableWithUpstream { 22 | public FlowableSerialized(Flowable source) { 23 | super(source); 24 | } 25 | 26 | @Override 27 | protected void subscribeActual(Subscriber s) { 28 | source.subscribe(new SerializedSubscriber<>(s)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeNever.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.maybe; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | import io.reactivex.rxjava3.internal.disposables.EmptyDisposable; 18 | 19 | /** 20 | * Doesn't signal any event other than onSubscribe. 21 | */ 22 | public final class MaybeNever extends Maybe { 23 | 24 | public static final MaybeNever INSTANCE = new MaybeNever(); 25 | 26 | @Override 27 | protected void subscribeActual(MaybeObserver observer) { 28 | observer.onSubscribe(EmptyDisposable.NEVER); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeUnsafeCreate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.maybe; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | 18 | /** 19 | * Wraps a MaybeSource without safeguard and calls its subscribe() method for each MaybeObserver. 20 | * 21 | * @param the value type 22 | */ 23 | public final class MaybeUnsafeCreate extends AbstractMaybeWithUpstream { 24 | 25 | public MaybeUnsafeCreate(MaybeSource source) { 26 | super(source); 27 | } 28 | 29 | @Override 30 | protected void subscribeActual(MaybeObserver observer) { 31 | source.subscribe(observer); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableFromUnsafeSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.observable; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | 18 | public final class ObservableFromUnsafeSource extends Observable { 19 | final ObservableSource source; 20 | 21 | public ObservableFromUnsafeSource(ObservableSource source) { 22 | this.source = source; 23 | } 24 | 25 | @Override 26 | protected void subscribeActual(Observer observer) { 27 | source.subscribe(observer); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableNever.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.observable; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | import io.reactivex.rxjava3.internal.disposables.EmptyDisposable; 18 | 19 | public final class ObservableNever extends Observable { 20 | public static final Observable INSTANCE = new ObservableNever(); 21 | 22 | private ObservableNever() { 23 | } 24 | 25 | @Override 26 | protected void subscribeActual(Observer o) { 27 | o.onSubscribe(EmptyDisposable.NEVER); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableSerialized.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.observable; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | import io.reactivex.rxjava3.observers.SerializedObserver; 18 | 19 | public final class ObservableSerialized extends AbstractObservableWithUpstream { 20 | public ObservableSerialized(Observable upstream) { 21 | super(upstream); 22 | } 23 | 24 | @Override 25 | protected void subscribeActual(Observer observer) { 26 | source.subscribe(new SerializedObserver<>(observer)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/single/SingleFromUnsafeSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.single; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | 18 | public final class SingleFromUnsafeSource extends Single { 19 | final SingleSource source; 20 | 21 | public SingleFromUnsafeSource(SingleSource source) { 22 | this.source = source; 23 | } 24 | 25 | @Override 26 | protected void subscribeActual(SingleObserver observer) { 27 | source.subscribe(observer); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/single/SingleJust.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.single; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | import io.reactivex.rxjava3.disposables.Disposable; 18 | 19 | public final class SingleJust extends Single { 20 | 21 | final T value; 22 | 23 | public SingleJust(T value) { 24 | this.value = value; 25 | } 26 | 27 | @Override 28 | protected void subscribeActual(SingleObserver observer) { 29 | observer.onSubscribe(Disposable.disposed()); 30 | observer.onSuccess(value); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/operators/single/SingleNever.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.single; 15 | 16 | import io.reactivex.rxjava3.core.*; 17 | import io.reactivex.rxjava3.internal.disposables.EmptyDisposable; 18 | 19 | public final class SingleNever extends Single { 20 | public static final Single INSTANCE = new SingleNever(); 21 | 22 | private SingleNever() { 23 | } 24 | 25 | @Override 26 | protected void subscribeActual(SingleObserver observer) { 27 | observer.onSubscribe(EmptyDisposable.NEVER); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/schedulers/NonBlockingThread.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.schedulers; 15 | 16 | /** 17 | * Marker interface to indicate blocking is not recommended while running 18 | * on a Scheduler with a thread type implementing it. 19 | */ 20 | public interface NonBlockingThread { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/subscribers/BlockingLastSubscriber.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.subscribers; 15 | 16 | /** 17 | * Blocks until the upstream signals its last value or completes. 18 | * 19 | * @param the value type 20 | */ 21 | public final class BlockingLastSubscriber extends BlockingBaseSubscriber { 22 | 23 | @Override 24 | public void onNext(T t) { 25 | value = t; 26 | } 27 | 28 | @Override 29 | public void onError(Throwable t) { 30 | value = null; 31 | error = t; 32 | countDown(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/subscribers/InnerQueuedSubscriberSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.subscribers; 15 | 16 | /** 17 | * Interface to allow the InnerQueuedSubscriber to call back a parent 18 | * with signals. 19 | * 20 | * @param the value type 21 | */ 22 | public interface InnerQueuedSubscriberSupport { 23 | 24 | void innerNext(InnerQueuedSubscriber inner, T value); 25 | 26 | void innerError(InnerQueuedSubscriber inner, Throwable e); 27 | 28 | void innerComplete(InnerQueuedSubscriber inner); 29 | 30 | void drain(); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/util/ConnectConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.util; 15 | 16 | import io.reactivex.rxjava3.disposables.Disposable; 17 | import io.reactivex.rxjava3.functions.Consumer; 18 | 19 | /** 20 | * Store the Disposable received from the connection. 21 | */ 22 | public final class ConnectConsumer implements Consumer { 23 | public Disposable disposable; 24 | 25 | @Override 26 | public void accept(Disposable t) { 27 | this.disposable = t; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/util/ErrorMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.util; 15 | 16 | /** 17 | * Indicates when an error from the main source should be reported. 18 | */ 19 | public enum ErrorMode { 20 | /** Report the error immediately, cancelling the active inner source. */ 21 | IMMEDIATE, 22 | /** Report error after an inner source terminated. */ 23 | BOUNDARY, 24 | /** Report the error after all sources terminated. */ 25 | END 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/util/HashMapSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.util; 15 | 16 | import java.util.*; 17 | 18 | import io.reactivex.rxjava3.functions.Supplier; 19 | 20 | public enum HashMapSupplier implements Supplier> { 21 | INSTANCE; 22 | 23 | @SuppressWarnings({ "unchecked", "rawtypes" }) 24 | public static Supplier> asSupplier() { 25 | return (Supplier)INSTANCE; 26 | } 27 | 28 | @Override public Map get() { 29 | return new HashMap<>(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/util/ListAddBiConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.util; 15 | 16 | import java.util.List; 17 | 18 | import io.reactivex.rxjava3.functions.BiFunction; 19 | 20 | @SuppressWarnings("rawtypes") 21 | public enum ListAddBiConsumer implements BiFunction { 22 | INSTANCE; 23 | 24 | @SuppressWarnings("unchecked") 25 | public static BiFunction, T, List> instance() { 26 | return (BiFunction)INSTANCE; 27 | } 28 | 29 | @SuppressWarnings("unchecked") 30 | @Override 31 | public List apply(List t1, Object t2) { 32 | t1.add(t2); 33 | return t1; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/util/SorterFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.util; 15 | 16 | import java.util.*; 17 | 18 | import io.reactivex.rxjava3.functions.Function; 19 | 20 | public final class SorterFunction implements Function, List> { 21 | 22 | final Comparator comparator; 23 | 24 | public SorterFunction(Comparator comparator) { 25 | this.comparator = comparator; 26 | } 27 | 28 | @Override 29 | public List apply(List t) { 30 | Collections.sort(t, comparator); 31 | return t; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/internal/util/SuppressAnimalSniffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.util; 15 | 16 | import java.lang.annotation.*; 17 | 18 | /** 19 | * Suppress errors by the AnimalSniffer plugin. 20 | */ 21 | @Retention(RetentionPolicy.CLASS) 22 | @Documented 23 | @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE}) 24 | public @interface SuppressAnimalSniffer { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/observables/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Classes supporting the Observable base reactive class: 16 | * {@link io.reactivex.rxjava3.observables.ConnectableObservable} and 17 | * {@link io.reactivex.rxjava3.observables.GroupedObservable}. 18 | */ 19 | package io.reactivex.rxjava3.observables; 20 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/operators/SimplePlainQueue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.operators; 15 | 16 | import io.reactivex.rxjava3.annotations.*; 17 | 18 | /** 19 | * Override of the {@link SimpleQueue} interface with no {@code throws Throwable} on {@code poll()}. 20 | * 21 | * @param the value type to offer and poll, not null 22 | * @since 3.1.1 23 | */ 24 | public interface SimplePlainQueue<@NonNull T> extends SimpleQueue { 25 | 26 | @Nullable 27 | @Override 28 | T poll(); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/operators/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Classes and interfaces for writing advanced operators within and outside RxJava. 16 | */ 17 | 18 | package io.reactivex.rxjava3.operators; -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/parallel/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Contains the base type {@link io.reactivex.rxjava3.parallel.ParallelFlowable}, 16 | * a sub-DSL for working with {@link io.reactivex.rxjava3.core.Flowable} sequences in parallel. 17 | */ 18 | package io.reactivex.rxjava3.parallel; 19 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/plugins/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Contains the central plugin handler {@link io.reactivex.rxjava3.plugins.RxJavaPlugins} 16 | * class to hook into the lifecycle of the base reactive types and schedulers. 17 | */ 18 | package io.reactivex.rxjava3.plugins; 19 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/schedulers/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Contains notably the factory class of {@link io.reactivex.rxjava3.schedulers.Schedulers Schedulers} providing methods for 16 | * retrieving the standard scheduler instances, the {@link io.reactivex.rxjava3.schedulers.TestScheduler TestScheduler} for testing flows 17 | * with scheduling in a controlled manner and the class {@link io.reactivex.rxjava3.schedulers.Timed Timed} that can hold 18 | * a value and a timestamp associated with it. 19 | */ 20 | package io.reactivex.rxjava3.schedulers; 21 | -------------------------------------------------------------------------------- /src/main/java/io/reactivex/rxjava3/subscribers/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | /** 15 | * Default wrappers and implementations for {@link org.reactivestreams.Subscriber Subscriber}-based consumer classes and interfaces, 16 | * including disposable ({@link io.reactivex.rxjava3.subscribers.DisposableSubscriber DisposableSubscriber}) and resource-tracking 17 | * ({@link io.reactivex.rxjava3.subscribers.ResourceSubscriber ResourceSubscriber}) 18 | * variants and the {@link io.reactivex.rxjava3.subscribers.TestSubscriber TestSubscriber} that allows unit testing 19 | * {@link io.reactivex.rxjava3.core.Flowable Flowable}-based flows. 20 | */ 21 | package io.reactivex.rxjava3.subscribers; 22 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/proguard/rxjava3.pro: -------------------------------------------------------------------------------- 1 | -dontwarn java.util.concurrent.Flow* -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/completable/CapturingUncaughtExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.completable; 15 | 16 | import java.util.concurrent.CountDownLatch; 17 | 18 | public final class CapturingUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { 19 | public int count; 20 | public Throwable caught; 21 | public CountDownLatch completed = new CountDownLatch(1); 22 | 23 | @Override 24 | public void uncaughtException(Thread t, Throwable e) { 25 | count++; 26 | caught = e; 27 | completed.countDown(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/flowable/FlowableEventStreamTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.flowable; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.RxJavaTest; 19 | import io.reactivex.rxjava3.testsupport.TestHelper; 20 | 21 | public class FlowableEventStreamTest extends RxJavaTest { 22 | @Test 23 | public void constructorShouldBePrivate() { 24 | TestHelper.checkUtilityClass(FlowableEventStream.class); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/jdk8/FlowableFromOptionalTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.jdk8; 15 | 16 | import java.util.Optional; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.*; 21 | 22 | public class FlowableFromOptionalTest extends RxJavaTest { 23 | 24 | @Test 25 | public void hasValue() { 26 | Flowable.fromOptional(Optional.of(1)) 27 | .test() 28 | .assertResult(1); 29 | } 30 | 31 | @Test 32 | public void empty() { 33 | Flowable.fromOptional(Optional.empty()) 34 | .test() 35 | .assertResult(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/jdk8/MaybeFromOptionalTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.jdk8; 15 | 16 | import java.util.Optional; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.*; 21 | 22 | public class MaybeFromOptionalTest extends RxJavaTest { 23 | 24 | @Test 25 | public void hasValue() { 26 | Maybe.fromOptional(Optional.of(1)) 27 | .test() 28 | .assertResult(1); 29 | } 30 | 31 | @Test 32 | public void empty() { 33 | Maybe.fromOptional(Optional.empty()) 34 | .test() 35 | .assertResult(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/jdk8/ObservableFromOptionalTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.jdk8; 15 | 16 | import java.util.Optional; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.*; 21 | 22 | public class ObservableFromOptionalTest extends RxJavaTest { 23 | 24 | @Test 25 | public void hasValue() { 26 | Observable.fromOptional(Optional.of(1)) 27 | .test() 28 | .assertResult(1); 29 | } 30 | 31 | @Test 32 | public void empty() { 33 | Observable.fromOptional(Optional.empty()) 34 | .test() 35 | .assertResult(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/observers/BlockingObserverTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.observers; 15 | 16 | import static org.junit.Assert.*; 17 | 18 | import java.util.*; 19 | 20 | import org.junit.Test; 21 | 22 | import io.reactivex.rxjava3.core.RxJavaTest; 23 | 24 | public class BlockingObserverTest extends RxJavaTest { 25 | 26 | @Test 27 | public void dispose() { 28 | Queue q = new ArrayDeque<>(); 29 | 30 | BlockingObserver bo = new BlockingObserver<>(q); 31 | 32 | bo.dispose(); 33 | 34 | assertEquals(BlockingObserver.TERMINATED, q.poll()); 35 | 36 | bo.dispose(); 37 | 38 | assertNull(q.poll()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/observers/EmptyCompletableObserverTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.observers; 15 | 16 | import static org.junit.Assert.assertFalse; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.RxJavaTest; 21 | 22 | public final class EmptyCompletableObserverTest extends RxJavaTest { 23 | 24 | @Test 25 | public void defaultShouldReportNoCustomOnError() { 26 | EmptyCompletableObserver o = new EmptyCompletableObserver(); 27 | 28 | assertFalse(o.hasCustomOnError()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/observers/InnerQueuedObserverTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.observers; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.RxJavaTest; 19 | import io.reactivex.rxjava3.testsupport.TestHelper; 20 | 21 | public class InnerQueuedObserverTest extends RxJavaTest { 22 | 23 | @Test 24 | public void dispose() { 25 | TestHelper.checkDisposed(new InnerQueuedObserver<>(null, 1)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableAutoConnectTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.flowable; 15 | 16 | import static org.junit.Assert.assertTrue; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.RxJavaTest; 21 | import io.reactivex.rxjava3.processors.PublishProcessor; 22 | 23 | public class FlowableAutoConnectTest extends RxJavaTest { 24 | 25 | @Test 26 | public void autoConnectImmediately() { 27 | PublishProcessor pp = PublishProcessor.create(); 28 | 29 | pp.publish().autoConnect(0); 30 | 31 | assertTrue(pp.hasSubscribers()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableInternalHelperTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.flowable; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.RxJavaTest; 19 | import io.reactivex.rxjava3.testsupport.TestHelper; 20 | 21 | public class FlowableInternalHelperTest extends RxJavaTest { 22 | 23 | @Test 24 | public void utilityClass() { 25 | TestHelper.checkUtilityClass(FlowableInternalHelper.class); 26 | } 27 | 28 | @Test 29 | public void requestMaxEnum() { 30 | TestHelper.checkEnum(FlowableInternalHelper.RequestMax.class); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeConcatArrayEagerDelayErrorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.maybe; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.Maybe; 19 | import io.reactivex.rxjava3.exceptions.TestException; 20 | 21 | public class MaybeConcatArrayEagerDelayErrorTest { 22 | 23 | @Test 24 | public void normal() { 25 | Maybe.concatArrayEagerDelayError( 26 | Maybe.just(1), 27 | Maybe.error(new TestException()), 28 | Maybe.empty(), 29 | Maybe.just(2) 30 | ) 31 | .test() 32 | .assertFailure(TestException.class, 1, 2); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeEmptyTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.maybe; 15 | 16 | import static org.junit.Assert.*; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.*; 21 | import io.reactivex.rxjava3.operators.ScalarSupplier; 22 | 23 | public class MaybeEmptyTest extends RxJavaTest { 24 | 25 | @Test 26 | public void scalarSupplier() { 27 | Maybe m = Maybe.empty(); 28 | 29 | assertTrue(m.getClass().toString(), m instanceof ScalarSupplier); 30 | 31 | assertNull(((ScalarSupplier)m).get()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeIsEmptySingleTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.maybe; 15 | 16 | import static org.junit.Assert.assertSame; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.*; 21 | import io.reactivex.rxjava3.internal.fuseable.HasUpstreamMaybeSource; 22 | 23 | public class MaybeIsEmptySingleTest extends RxJavaTest { 24 | 25 | @Test 26 | public void source() { 27 | Maybe m = Maybe.just(1); 28 | 29 | assertSame(m, (((HasUpstreamMaybeSource)m.isEmpty()).source())); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeJustTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.maybe; 15 | 16 | import static org.junit.Assert.*; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.*; 21 | import io.reactivex.rxjava3.operators.ScalarSupplier; 22 | 23 | public class MaybeJustTest extends RxJavaTest { 24 | 25 | @SuppressWarnings("unchecked") 26 | @Test 27 | public void scalarSupplier() { 28 | Maybe m = Maybe.just(1); 29 | 30 | assertTrue(m.getClass().toString(), m instanceof ScalarSupplier); 31 | 32 | assertEquals(1, ((ScalarSupplier)m).get().intValue()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeMergeWithTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.maybe; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.*; 19 | 20 | public class MaybeMergeWithTest extends RxJavaTest { 21 | 22 | @Test 23 | public void normal() { 24 | Maybe.just(1).mergeWith(Maybe.just(2)) 25 | .test() 26 | .assertResult(1, 2); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeSubscribeOnTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.maybe; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.*; 19 | import io.reactivex.rxjava3.schedulers.Schedulers; 20 | import io.reactivex.rxjava3.testsupport.TestHelper; 21 | 22 | public class MaybeSubscribeOnTest extends RxJavaTest { 23 | 24 | @Test 25 | public void dispose() { 26 | TestHelper.checkDisposed(Maybe.just(1).subscribeOn(Schedulers.single())); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/mixed/ScalarXMapZHelperTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.mixed; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.RxJavaTest; 19 | import io.reactivex.rxjava3.testsupport.TestHelper; 20 | 21 | public class ScalarXMapZHelperTest extends RxJavaTest { 22 | 23 | @Test 24 | public void utilityClass() { 25 | TestHelper.checkUtilityClass(ScalarXMapZHelper.class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/observable/ObservableAutoConnectTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.observable; 15 | 16 | import static org.junit.Assert.assertTrue; 17 | 18 | import org.junit.Test; 19 | 20 | import io.reactivex.rxjava3.core.RxJavaTest; 21 | import io.reactivex.rxjava3.subjects.PublishSubject; 22 | 23 | public class ObservableAutoConnectTest extends RxJavaTest { 24 | 25 | @Test 26 | public void autoConnectImmediately() { 27 | PublishSubject ps = PublishSubject.create(); 28 | 29 | ps.publish().autoConnect(0); 30 | 31 | assertTrue(ps.hasObservers()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/single/SingleConcatArrayDelayErrorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.single; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.Single; 19 | import io.reactivex.rxjava3.exceptions.TestException; 20 | 21 | public class SingleConcatArrayDelayErrorTest { 22 | 23 | @Test 24 | public void normal() { 25 | Single.concatArrayDelayError( 26 | Single.just(1), 27 | Single.error(new TestException()), 28 | Single.just(2) 29 | ) 30 | .test() 31 | .assertFailure(TestException.class, 1, 2); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/operators/single/SingleConcatArrayEagerDelayErrorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.operators.single; 15 | 16 | import org.junit.Test; 17 | 18 | import io.reactivex.rxjava3.core.Single; 19 | import io.reactivex.rxjava3.exceptions.TestException; 20 | 21 | public class SingleConcatArrayEagerDelayErrorTest { 22 | 23 | @Test 24 | public void normal() { 25 | Single.concatArrayEagerDelayError( 26 | Single.just(1), 27 | Single.error(new TestException()), 28 | Single.just(2) 29 | ) 30 | .test() 31 | .assertFailure(TestException.class, 1, 2); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/internal/schedulers/ExecutorSchedulerInternalTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.internal.schedulers; 15 | 16 | import static org.junit.Assert.assertNotNull; 17 | 18 | import org.junit.Test; 19 | 20 | public class ExecutorSchedulerInternalTest { 21 | 22 | @Test 23 | public void helperHolder() { 24 | assertNotNull(new ExecutorScheduler.SingleHolder()); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/AmbArrayTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class AmbArrayTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.ambArray( 28 | Flowable.fromIterable(iterate(elements)), 29 | Flowable.never() 30 | ) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/AmbTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.Arrays; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class AmbTckTest extends BaseTck { 25 | 26 | @Override 27 | public Publisher createPublisher(long elements) { 28 | return 29 | Flowable.amb(Arrays.asList( 30 | Flowable.fromIterable(iterate(elements)), 31 | Flowable.never() 32 | ) 33 | ) 34 | ; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/BufferExactSizeTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.List; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class BufferExactSizeTckTest extends BaseTck> { 25 | 26 | @Override 27 | public Publisher> createPublisher(long elements) { 28 | return 29 | Flowable.fromIterable(iterate(elements * 2)) 30 | .buffer(2) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/CacheTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class CacheTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.fromIterable(iterate(elements)).cache() 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/CompletableAndThenPublisherTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class CompletableAndThenPublisherTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(final long elements) { 26 | return 27 | Completable.complete().hide().andThen(Flowable.range(0, (int)elements)) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ConcatIterableEagerTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class ConcatIterableEagerTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.concatArrayEager( 28 | Flowable.fromIterable(iterate(elements / 2)), 29 | Flowable.fromIterable(iterate(elements - elements / 2)) 30 | ) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ConcatPublisherEagerTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class ConcatPublisherEagerTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.concatEager(Flowable.just( 28 | Flowable.fromIterable(iterate(elements / 2)), 29 | Flowable.fromIterable(iterate(elements - elements / 2)) 30 | ) 31 | ) 32 | ; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ConcatPublisherTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class ConcatPublisherTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.concat(Flowable.just( 28 | Flowable.fromIterable(iterate(elements / 2)), 29 | Flowable.fromIterable(iterate(elements - elements / 2)) 30 | ) 31 | ) 32 | ; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ConcatTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class ConcatTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.concat( 28 | Flowable.fromIterable(iterate(elements / 2)), 29 | Flowable.fromIterable(iterate(elements - elements / 2)) 30 | ) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ConcatWithCompletableTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class ConcatWithCompletableTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(1, (int)elements) 28 | .concatWith(Completable.complete()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ConcatWithMaybeEmptyTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class ConcatWithMaybeEmptyTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(1, (int)elements) 28 | .concatWith(Maybe.empty()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ConcatWithMaybeTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class ConcatWithMaybeTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(1, Math.max(0, (int)elements - 1)) 28 | .concatWith(Maybe.just((int)elements)) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ConcatWithSingleTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class ConcatWithSingleTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(1, Math.max(0, (int)elements - 1)) 28 | .concatWith(Single.just((int)elements)) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/DefaultIfEmptyTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class DefaultIfEmptyTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(1, (int)elements).defaultIfEmpty(0) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/DelaySubscriptionTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.concurrent.TimeUnit; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class DelaySubscriptionTckTest extends BaseTck { 25 | 26 | public DelaySubscriptionTckTest() { 27 | super(200L); 28 | } 29 | 30 | @Override 31 | public Publisher createPublisher(long elements) { 32 | return 33 | Flowable.range(0, (int)elements).delaySubscription(1, TimeUnit.MILLISECONDS) 34 | ; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/DelayTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.concurrent.TimeUnit; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class DelayTckTest extends BaseTck { 25 | 26 | public DelayTckTest() { 27 | super(100L); 28 | } 29 | 30 | @Override 31 | public Publisher createPublisher(long elements) { 32 | return 33 | Flowable.range(0, (int)elements).delay(1, TimeUnit.MILLISECONDS) 34 | ; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/DistinctTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class DistinctTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements) 28 | .concatWith(Flowable.range(0, (int)elements)) 29 | .distinct() 30 | ; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/DistinctUntilChangedTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class DistinctUntilChangedTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements) 28 | .distinctUntilChanged() 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/DoAfterNextTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class DoAfterNextTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).doAfterNext(Functions.emptyConsumer()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/DoFinallyTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class DoFinallyTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).doFinally(Functions.EMPTY_ACTION) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/DoOnNextTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class DoOnNextTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).doOnNext(Functions.emptyConsumer()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ElementAtTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class ElementAtTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(final long elements) { 26 | return 27 | Flowable.range(1, 10).elementAt(5).toFlowable() 28 | ; 29 | } 30 | 31 | @Override 32 | public long maxElementsFromPublisher() { 33 | return 1; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/EmptyTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class EmptyTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(final long elements) { 26 | return Flowable.empty(); 27 | } 28 | 29 | @Override 30 | public long maxElementsFromPublisher() { 31 | return 0; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/FirstTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class FirstTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(final long elements) { 26 | return 27 | Flowable.range(1, 10).firstElement().toFlowable() 28 | ; 29 | } 30 | 31 | @Override 32 | public long maxElementsFromPublisher() { 33 | return 1; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/FromArrayTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class FromArrayTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.fromArray(array(elements)) 28 | ; 29 | } 30 | 31 | @Override 32 | public long maxElementsFromPublisher() { 33 | return 1024 * 1024; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/FromIterableTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class FromIterableTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return Flowable.fromIterable(iterate(elements)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/HideTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class HideTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return Flowable.range(0, (int)elements).hide(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/IgnoreElementsTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class IgnoreElementsTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(final long elements) { 26 | return 27 | Flowable.range(1, 1000).ignoreElements().toFlowable() 28 | ; 29 | } 30 | 31 | @Override 32 | public long maxElementsFromPublisher() { 33 | return 0; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/IntervalRangeTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.concurrent.TimeUnit; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class IntervalRangeTckTest extends BaseTck { 25 | 26 | @Override 27 | public Publisher createPublisher(long elements) { 28 | return 29 | Flowable.intervalRange(0, elements, 0, 1, TimeUnit.MILLISECONDS) 30 | .onBackpressureBuffer() 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/IntervalTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.concurrent.TimeUnit; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class IntervalTckTest extends BaseTck { 25 | 26 | public IntervalTckTest() { 27 | super(50); 28 | } 29 | 30 | @Override 31 | public Publisher createPublisher(long elements) { 32 | return 33 | Flowable.interval(0, 1, TimeUnit.MILLISECONDS).take(elements) 34 | .onBackpressureBuffer() 35 | ; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/IsEmptyTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class IsEmptyTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(final long elements) { 26 | return 27 | Flowable.range(1, 10).isEmpty().toFlowable() 28 | ; 29 | } 30 | 31 | @Override 32 | public long maxElementsFromPublisher() { 33 | return 1; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/JustTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class JustTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.just(0L) 28 | ; 29 | } 30 | 31 | @Override 32 | public long maxElementsFromPublisher() { 33 | return 1L; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/LastTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class LastTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(final long elements) { 26 | return 27 | Flowable.range(1, 10).lastElement().toFlowable() 28 | ; 29 | } 30 | 31 | @Override 32 | public long maxElementsFromPublisher() { 33 | return 1; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/LimitTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class LimitTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements * 2).take(elements) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/MapTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class MapTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).map(Functions.identity()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/MergeIterableTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.Arrays; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class MergeIterableTckTest extends BaseTck { 25 | 26 | @Override 27 | public Publisher createPublisher(long elements) { 28 | return 29 | Flowable.merge(Arrays.asList( 30 | Flowable.fromIterable(iterate(elements / 2)), 31 | Flowable.fromIterable(iterate(elements - elements / 2)) 32 | ) 33 | ) 34 | ; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/MergePublisherTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class MergePublisherTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.merge(Flowable.just( 28 | Flowable.fromIterable(iterate(elements / 2)), 29 | Flowable.fromIterable(iterate(elements - elements / 2)) 30 | ) 31 | ) 32 | ; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/MergeTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class MergeTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.merge( 28 | Flowable.fromIterable(iterate(elements / 2)), 29 | Flowable.fromIterable(iterate(elements - elements / 2)) 30 | ) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/MergeWithCompletableTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class MergeWithCompletableTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.rangeLong(1, elements) 28 | .mergeWith(Completable.complete()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/MergeWithMaybeEmptyTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class MergeWithMaybeEmptyTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.rangeLong(1, elements) 28 | .mergeWith(Maybe.empty()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/MergeWithMaybeTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class MergeWithMaybeTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | if (elements == 0) { 27 | return Flowable.empty() 28 | .mergeWith(Maybe.empty()); 29 | } 30 | return 31 | Flowable.rangeLong(1, elements - 1) 32 | .mergeWith(Maybe.just(elements)) 33 | ; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/MergeWithSingleTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.*; 20 | 21 | @Test 22 | public class MergeWithSingleTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | if (elements == 0) { 27 | return Flowable.empty(); 28 | } 29 | return 30 | Flowable.rangeLong(1, elements - 1) 31 | .mergeWith(Single.just(elements)) 32 | ; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ObserveOnTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.schedulers.Schedulers; 21 | 22 | @Test 23 | public class ObserveOnTckTest extends BaseTck { 24 | 25 | public ObserveOnTckTest() { 26 | super(100L); 27 | } 28 | 29 | @Override 30 | public Publisher createPublisher(long elements) { 31 | return 32 | Flowable.range(0, (int)elements).observeOn(Schedulers.single()) 33 | ; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/OnBackpressureBufferTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class OnBackpressureBufferTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).onBackpressureBuffer() 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/OnErrorResumeWithTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class OnErrorResumeWithTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).onErrorResumeWith(Flowable.never()) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/OnErrorReturnItemTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class OnErrorReturnItemTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).onErrorReturnItem(0) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/PublishSelectorTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.functions.Function; 21 | import io.reactivex.rxjava3.internal.functions.Functions; 22 | 23 | @Test 24 | public class PublishSelectorTckTest extends BaseTck { 25 | 26 | @SuppressWarnings({ "unchecked", "rawtypes" }) 27 | @Override 28 | public Publisher createPublisher(long elements) { 29 | return 30 | Flowable.range(0, (int)elements).publish((Function)Functions.identity()) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/PublishTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class PublishTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).publish().autoConnect() 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/RangeTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class RangeTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/RebatchRequestsTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class RebatchRequestsTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).rebatchRequests(2) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/RepeatTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class RepeatTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return Flowable.just(1).repeat(elements); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ReplaySelectorTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.functions.Function; 21 | import io.reactivex.rxjava3.internal.functions.Functions; 22 | 23 | @Test 24 | public class ReplaySelectorTckTest extends BaseTck { 25 | 26 | @SuppressWarnings({ "unchecked", "rawtypes" }) 27 | @Override 28 | public Publisher createPublisher(long elements) { 29 | return 30 | Flowable.range(0, (int)elements).replay((Function)Functions.identity()) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ReplayTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class ReplayTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).replay().autoConnect() 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/RetryTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class RetryTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).retry(1) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ShareTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class ShareTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).share() 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SingleTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class SingleTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(final long elements) { 26 | return 27 | Flowable.just(1).singleElement().toFlowable() 28 | ; 29 | } 30 | 31 | @Override 32 | public long maxElementsFromPublisher() { 33 | return 1; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SkipLastTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class SkipLastTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements * 2).skipLast((int)elements) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SkipTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class SkipTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements * 2).skip(elements) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SkipUntilTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class SkipUntilTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).skipUntil(Flowable.just(1)) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SkipWhileTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class SkipWhileTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).skipWhile(Functions.alwaysFalse()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SortedTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class SortedTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).sorted() 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SubscribeOnTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.schedulers.Schedulers; 21 | 22 | @Test 23 | public class SubscribeOnTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).subscribeOn(Schedulers.single()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SwitchIfEmptyTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class SwitchIfEmptyTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.empty().switchIfEmpty(Flowable.range(1, (int)elements)) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SwitchMapDelayErrorTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class SwitchMapDelayErrorTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.just(1).switchMapDelayError(Functions.justFunction( 29 | Flowable.fromIterable(iterate(elements))) 30 | ) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SwitchMapTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class SwitchMapTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.just(1).switchMap(Functions.justFunction( 29 | Flowable.fromIterable(iterate(elements))) 30 | ) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/SwitchOnNextTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class SwitchOnNextTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.switchOnNext(Flowable.just( 28 | Flowable.fromIterable(iterate(elements))) 29 | ) 30 | ; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/TakeLastTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class TakeLastTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements * 2).takeLast((int)elements) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/TakeTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class TakeTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements * 2).take(elements) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/TakeUntilTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | 21 | @Test 22 | public class TakeUntilTckTest extends BaseTck { 23 | 24 | @Override 25 | public Publisher createPublisher(long elements) { 26 | return 27 | Flowable.range(0, (int)elements).takeUntil(Flowable.never()) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/TakeWhileTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class TakeWhileTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).takeWhile(Functions.alwaysTrue()) 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/TimeIntervalTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.schedulers.Timed; 21 | 22 | @Test 23 | public class TimeIntervalTckTest extends BaseTck> { 24 | 25 | @Override 26 | public Publisher> createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).timeInterval() 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/TimeoutTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.concurrent.TimeUnit; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class TimeoutTckTest extends BaseTck { 25 | 26 | @Override 27 | public Publisher createPublisher(long elements) { 28 | return 29 | Flowable.range(0, (int)elements).timeout(1, TimeUnit.DAYS) 30 | ; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/TimerTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.concurrent.TimeUnit; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class TimerTckTest extends BaseTck { 25 | 26 | @Override 27 | public Publisher createPublisher(final long elements) { 28 | return 29 | Flowable.timer(1, TimeUnit.MILLISECONDS) 30 | .onBackpressureLatest() 31 | ; 32 | } 33 | 34 | @Override 35 | public long maxElementsFromPublisher() { 36 | return 1; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/TimestampTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.schedulers.Timed; 21 | 22 | @Test 23 | public class TimestampTckTest extends BaseTck> { 24 | 25 | @Override 26 | public Publisher> createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements).timestamp() 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ToListTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.List; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class ToListTckTest extends BaseTck> { 25 | 26 | @Override 27 | public Publisher> createPublisher(final long elements) { 28 | return 29 | Flowable.range(1, 1000).toList().toFlowable() 30 | ; 31 | } 32 | 33 | @Override 34 | public long maxElementsFromPublisher() { 35 | return 1; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/ToSortedListTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import java.util.List; 17 | 18 | import org.reactivestreams.Publisher; 19 | import org.testng.annotations.Test; 20 | 21 | import io.reactivex.rxjava3.core.Flowable; 22 | 23 | @Test 24 | public class ToSortedListTckTest extends BaseTck> { 25 | 26 | @Override 27 | public Publisher> createPublisher(final long elements) { 28 | return 29 | Flowable.range(1, 1000).toSortedList().toFlowable() 30 | ; 31 | } 32 | 33 | @Override 34 | public long maxElementsFromPublisher() { 35 | return 1; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/UnsubscribeOnTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.schedulers.Schedulers; 21 | 22 | @Test 23 | public class UnsubscribeOnTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.range(0, (int)elements * 2) 29 | .unsubscribeOn(Schedulers.single()) 30 | .take(elements) 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/tck/UsingTckTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.tck; 15 | 16 | import org.reactivestreams.Publisher; 17 | import org.testng.annotations.Test; 18 | 19 | import io.reactivex.rxjava3.core.Flowable; 20 | import io.reactivex.rxjava3.internal.functions.Functions; 21 | 22 | @Test 23 | public class UsingTckTest extends BaseTck { 24 | 25 | @Override 26 | public Publisher createPublisher(long elements) { 27 | return 28 | Flowable.using(Functions.justSupplier(1), 29 | Functions.justFunction(Flowable.fromIterable(iterate(elements))), 30 | Functions.emptyConsumer() 31 | ) 32 | ; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/testsupport/SuppressUndeliverable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.testsupport; 15 | 16 | import java.lang.annotation.*; 17 | 18 | @Retention(RetentionPolicy.RUNTIME) 19 | @Target(ElementType.METHOD) 20 | public @interface SuppressUndeliverable { 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/io/reactivex/rxjava3/validators/ParameterNamesInClassesTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-present, RxJava Contributors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in 5 | * compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is 10 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See 11 | * the License for the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package io.reactivex.rxjava3.validators; 15 | 16 | import static org.junit.Assert.assertEquals; 17 | import org.junit.Test; 18 | 19 | public class ParameterNamesInClassesTest { 20 | void method(int paramName) { 21 | // deliberately empty 22 | } 23 | 24 | @Test 25 | public void javacParametersEnabled() throws Exception { 26 | assertEquals("Please enable saving parameter names via the -parameters javac argument", 27 | "paramName", 28 | getClass() 29 | .getDeclaredMethod("method", Integer.TYPE) 30 | .getParameters()[0].getName()); 31 | } 32 | } 33 | --------------------------------------------------------------------------------