Scala 类和 Java 类比较

注意

Scala Observable 和 Java Observable 比较

Java 方法 Scala 方法
all(Func1<? super T, Boolean>) forall(T => Boolean)
amb(Observable<? extends T>, Observable<? extends T>)
amb(...)
amb(...)
amb(...)
amb(...)
amb(...)
amb(...)
amb(...)
无必要,因为我们可以使用 o1 amb o2 或者 amb(List(o1, o2, o3, ...) 代替。
amb(Iterable<? extends Observable<? extends T>>) amb(Observable[T]*)
ambWith(Observable<? extends T>) amb(Observable[U])
asObservable() 在 Scala 中被认为是无必要的。
buffer(Int) tumblingBuffer(Int)
buffer(Long, TimeUnit) tumblingBuffer(Duration)
buffer(Func0<? extends Observable<? extends TClosing>>)
buffer(Observable<B>)
tumblingBuffer(=> Observable[Any])
buffer(Long, Long, TimeUnit, Scheduler) slidingBuffer(Duration, Duration, Scheduler)
buffer(Int, Int) slidingBuffer(Int, Int)
buffer(Long, TimeUnit, Scheduler) tumblingBuffer(Duration, Scheduler)
buffer(...) slidingBuffer(Observable[Opening])(Opening => Observable[Any])
buffer(Long, TimeUnit, Int, Scheduler) tumblingBuffer(Duration, Int, Scheduler)
buffer(Observable<B>, Int) tumblingBuffer(Observable[Any], Int)
buffer(Long, Long, TimeUnit) slidingBuffer(Duration, Duration)
buffer(Long, TimeUnit, Int) tumblingBuffer(Duration, Int)
cache(Int) cache(Int)
cache() cache
cast(Class<R>) RxJava 需要这个,因为 rx.Observable 是不变的。RxScala 中的 Observable 是协变的,不需要这个操作符。
collect(Func0<R>, Action2<R, ? super T>) TODO: 参见 https://github.com/ReactiveX/RxScala/issues/63
combineLatest(...) combineLatest(Observable[U])
combineLatest(...)
combineLatest(...)
combineLatest(...)
combineLatest(...)
combineLatest(...)
combineLatest(...)
combineLatest(...)
如果 C# 不需要,Scala 也不需要它 ;-)
combineLatest(...) combineLatest(Seq[Observable[T]])(Seq[T] => R)
compose(Transformer<? super T, ? extends R>) 使用扩展方法代替。
concat(Observable<? extends Observable<? extends T>>) concat(<:<[Observable[T], Observable[Observable[U]]])
concat(Observable<? extends T>, Observable<? extends T>)
concat(...)
concat(...)
concat(...)
concat(...)
concat(...)
concat(...)
concat(...)
无必要,因为我们可以使用 ++ 或者 Observable(o1, o2, ...).concat 代替。
concatEager(Iterable<? extends Observable<? extends T>>, Int) 使用 iter.toObservable.concatEager(Int)
concatEager(Observable<? extends Observable<? extends T>>, Int) concatEager(Int)(<:<[Observable[T], Observable[Observable[U]]])
concatEager(Observable<? extends T>, Observable<? extends T>)
concatEager(...)
concatEager(...)
concatEager(...)
concatEager(...)
concatEager(...)
concatEager(...)
concatEager(...)
无必要,因为我们可以使用 concatEager 或者 Observable(o1, o2, ...).concatEager 代替。
concatEager(Iterable<? extends Observable<? extends T>>) 使用 iter.toObservable.concatEager
concatEager(Observable<? extends Observable<? extends T>>) concatEager(<:<[Observable[T], Observable[Observable[U]]])
concatMap(Func1<? super T, ? extends Observable<? extends R>>) concatMap(T => Observable[R])
concatMapEager(...) concatMapEager(Int, T => Observable[R])
concatMapEager(...) concatMapEager(T => Observable[R])
concatWith(Observable<? extends T>) 使用 o1 ++ o2
contains(Any) contains(U)
count() length
countLong() countLong
create(OnSubscribe<T>) apply(Subscriber[T] => Unit)
debounce(Long, TimeUnit) debounce(Duration)
debounce(Func1<? super T, ? extends Observable<U>>) debounce(T => Observable[Any])
debounce(Long, TimeUnit, Scheduler) debounce(Duration, Scheduler)
defaultIfEmpty(T) orElse(=> U)
defer(Func0<Observable<T>>) defer(=> Observable[T])
delay(Long, TimeUnit) delay(Duration)
delay(...) delay(() => Observable[Any], T => Observable[Any])
delay(Long, TimeUnit, Scheduler) delay(Duration, Scheduler)
delay(Func1<? super T, ? extends Observable<U>>) delay(T => Observable[Any])
delaySubscription(Long, TimeUnit, Scheduler) delaySubscription(Duration, Scheduler)
delaySubscription(Func0<? extends Observable<U>>) delaySubscription(() => Observable[Any])
delaySubscription(Long, TimeUnit) delaySubscription(Duration)
dematerialize() dematerialize(<:<[Observable[T], Observable[Notification[U]]])
distinct(Func1<? super T, ? extends U>) distinct(T => U)
distinct() distinct
distinctUntilChanged() distinctUntilChanged
distinctUntilChanged(Func1<? super T, ? extends U>) distinctUntilChanged(T => U)
doOnCompleted(Action0) doOnCompleted(=> Unit)
doOnEach(Action1<Notification<? super T>>) 使用 doOnEach(T => Unit, Throwable => Unit, () => Unit)
doOnEach(Observer<? super T>) doOnEach(Observer[T])
doOnError(Action1<Throwable>) doOnError(Throwable => Unit)
doOnNext(Action1<? super T>) doOnNext(T => Unit)
doOnRequest(Action1<Long>) doOnRequest(Long => Unit)
doOnSubscribe(Action0) doOnSubscribe(=> Unit)
doOnTerminate(Action0) doOnTerminate(=> Unit)
doOnUnsubscribe(Action0) doOnUnsubscribe(=> Unit)
elementAt(Int) elementAt(Int)
elementAtOrDefault(Int, T) elementAtOrDefault(Int, U)
empty() empty
error(Throwable) error(Throwable)
exists(Func1<? super T, Boolean>) exists(T => Boolean)
extend(Func1<? super OnSubscribe<T>, ? extends R>) 使用 Scala 隐式特性扩展 Observable
filter(Func1<? super T, Boolean>) filter(T => Boolean)
finallyDo(Action0) finallyDo(=> Unit)
first() first
first(Func1<? super T, Boolean>) 使用 .filter(condition).first
firstOrDefault(T, Func1<? super T, Boolean>) 使用 .filter(condition).firstOrElse(default)
firstOrDefault(T) firstOrElse(=> U)
flatMap(...) flatMap(T => Observable[R], Throwable => Observable[R], () => Observable[R])
flatMap(...) flatMap(Int, T => Observable[R], Throwable => Observable[R], () => Observable[R])
flatMap(...) flatMap(Int, T => Observable[R])
flatMap(...) flatMapWith(Int, T => Observable[U])((T, U) => R)
flatMap(...) flatMapWith(T => Observable[U])((T, U) => R)
flatMap(Func1<? super T, ? extends Observable<? extends R>>) flatMap(T => Observable[R])
flatMapIterable(...) flatMapIterable(T => Iterable[R])
flatMapIterable(...) flatMapIterableWith(T => Iterable[U])((T, U) => R)
forEach(Action1<? super T>) foreach(T => Unit)
forEach(Action1<? super T>, Action1<Throwable>, Action0) foreach(T => Unit, Throwable => Unit, () => Unit)
forEach(Action1<? super T>, Action1<Throwable>) foreach(T => Unit, Throwable => Unit)
from(Future<? extends T>)
from(Future<? extends T>, Long, TimeUnit)
from(Future<? extends T>, Scheduler)
TODO: 确定 Scala Futures 应该如何与 Observables 相关。Future 和 Observable 应该有共同的基接口吗?Futures 也应该有取消订阅方法吗?
from(T[])
from(Iterable<? extends T>)
from(Iterable[T])
fromCallable(Callable<? extends T>) 使用 Observable.defer(Observable.just(expensiveComputation))
groupBy(Func1<? super T, ? extends K>) groupBy(T => K)
groupBy(...) groupBy(T => K, T => V)
groupJoin(...) groupJoin(Observable[S])(T => Observable[Any], S => Observable[Any], (T, Observable[S]) => R)
ignoreElements() 使用 filter(_ => false)
interval(Long, TimeUnit) interval(Duration)
interval(Long, Long, TimeUnit) interval(Duration, Duration)
interval(Long, Long, TimeUnit, Scheduler) interval(Duration, Duration, Scheduler)
interval(Long, TimeUnit, Scheduler) interval(Duration, Scheduler)
isEmpty() isEmpty
join(...) join(Observable[S])(T => Observable[Any], S => Observable[Any], (T, S) => R)
just(T)
just(T, T)
just(T, T, T)
just(T, T, T, T)
just(T, T, T, T, T)
just(T, T, T, T, T, T)
just(T, T, T, T, T, T, T)
just(T, T, T, T, T, T, T, T)
just(T, T, T, T, T, T, T, T, T)
just(T, T, T, T, T, T, T, T, T, T)
使用 just(T*)
last() last
last(Func1<? super T, Boolean>) 使用 filter(predicate).last
lastOrDefault(T, Func1<? super T, Boolean>) 使用 filter(predicate).lastOrElse(default)
lastOrDefault(T) lastOrElse(=> U)
lift(Operator<? extends R, ? super T>) lift(Subscriber[R] => Subscriber[T])
limit(Int) take(Int)
map(Func1<? super T, ? extends R>) map(T => R)
materialize() materialize
merge(Array<Observable<? extends T>>, Int) 使用 Observable.from(array).flatten(n)
merge(Array<Observable<? extends T>>) 使用 Observable.from(array).flatten
merge(...)
merge(...)
merge(...)
merge(...)
merge(...)
merge(...)
merge(...)
无必要,因为我们可以使用 Observable(o1, o2, ...).flatten 代替。
merge(Observable<? extends Observable<? extends T>>) flatten(<:<[Observable[T], Observable[Observable[U]]])
merge(Observable<? extends T>, Observable<? extends T>) merge(Observable[U])
merge(Iterable<? extends Observable<? extends T>>) 使用 Observable.from(iter).flatten
merge(Observable<? extends Observable<? extends T>>, Int) flatten(Int)(<:<[Observable[T], Observable[Observable[U]]])
merge(Iterable<? extends Observable<? extends T>>, Int) 使用 Observable.from(iter).flatten(n)
mergeDelayError(Observable<? extends Observable<? extends T>>) flattenDelayError(<:<[Observable[T], Observable[Observable[U]]])
mergeDelayError(...) flattenDelayError(Int)(<:<[Observable[T], Observable[Observable[U]]])
mergeDelayError(...)
mergeDelayError(...)
mergeDelayError(...)
mergeDelayError(...)
mergeDelayError(...)
mergeDelayError(...)
mergeDelayError(...)
无必要,因为我们可以使用 Observable(o1, o2, ...).flattenDelayError 代替。
mergeDelayError(...) mergeDelayError(Observable[U])
mergeWith(Observable<? extends T>) merge(Observable[U])
nest() nest
never() never
observeOn(Scheduler) observeOn(Scheduler)
ofType(Class<R>) 使用 filter(_.isInstanceOf[Class])
onBackpressureBuffer(Long) onBackpressureBuffer(Long)
onBackpressureBuffer(Long, Action0) onBackpressureBuffer(Long, => Unit)
onBackpressureBuffer() onBackpressureBuffer
onBackpressureDrop(Action1<? super T>) onBackpressureDrop(T => Unit)
onBackpressureDrop() onBackpressureDrop
onBackpressureLatest() onBackpressureLatest
onErrorResumeNext(...)
onErrorResumeNext(Observable<? extends T>)
onErrorResumeNext(Throwable => Observable[U])
onErrorReturn(Func1<Throwable, ? extends T>) onErrorReturn(Throwable => U)
onExceptionResumeNext(Observable<? extends T>) onExceptionResumeNext(Observable[U])
publish() publish
publish(Func1<? super Observable<T>, ? extends Observable<R>>) publish(Observable[T] => Observable[R])
range(Int, Int) Java Observable 的 range 方法接受 startcount 参数,而 Scala Iterable 的 range 方法接受 startend 参数,因此添加这两个方法中的任何一个都会造成混淆。此外,由于 scala.collection.immutable.RangeIterable 的子类型,因此有两种创建范围 Observable 的好方法:(start to end).toObservableObservable.from(start to end),使用 untilby 还可以实现更多选项。
range(Int, Int, Scheduler) 使用 (start until end).toObservable.subscribeOn(scheduler) 代替 range(start, count, scheduler)
reduce(Func2<T, T, T>) reduce((U, U) => U)
reduce(R, Func2<R, ? super T, R>) foldLeft(R)((R, T) => R)
repeat() repeat
repeat(Long) repeat(Long)
repeat(Long, Scheduler) repeat(Long, Scheduler)
repeat(Scheduler) repeat(Scheduler)
repeatWhen(...) repeatWhen(Observable[Unit] => Observable[Any])
repeatWhen(...) repeatWhen(Observable[Unit] => Observable[Any], Scheduler)
replay(...) replay(Observable[T] => Observable[R], Int, Duration, Scheduler)
replay(...) replay(Observable[T] => Observable[R], Scheduler)
replay(Long, TimeUnit, Scheduler) replay(Duration, Scheduler)
replay(Scheduler) replay(Scheduler)
replay(...) replay(Observable[T] => Observable[R], Int)
replay(...) replay(Observable[T] => Observable[R], Duration)
replay(Long, TimeUnit) replay(Duration)
replay(Int, Long, TimeUnit) replay(Int, Duration)
replay(...) replay(Observable[T] => Observable[R], Int, Duration)
replay(Int, Long, TimeUnit, Scheduler) replay(Int, Duration, Scheduler)
replay(Func1<? super Observable<T>, ? extends Observable<R>>) replay(Observable[T] => Observable[R])
replay(Int) replay(Int)
replay(...) replay(Observable[T] => Observable[R], Int, Scheduler)
replay(...) replay(Observable[T] => Observable[R], Duration, Scheduler)
replay(Int, Scheduler) replay(Int, Scheduler)
replay() replay
retry(Long) retry(Long)
retry() retry
retry(Func2<Integer, Throwable, Boolean>) retry((Int, Throwable) => Boolean)
retryWhen(...) retryWhen(Observable[Throwable] => Observable[Any])
retryWhen(...) retryWhen(Observable[Throwable] => Observable[Any], Scheduler)
sample(Long, TimeUnit) sample(Duration)
sample(Long, TimeUnit, Scheduler) sample(Duration, Scheduler)
sample(Observable<U>) sample(Observable[Any])
scan(Func2<T, T, T>) 在 Scala 中被认为是无必要的。
scan(R, Func2<R, ? super T, R>) scan(R)((R, T) => R)
sequenceEqual(Observable<? extends T>, Observable<? extends T>) sequenceEqual(Observable[U])
sequenceEqual(...) sequenceEqualWith(Observable[U])((U, U) => Boolean)
serialize() serialize
share() share
single(Func1<? super T, Boolean>) 使用 filter(predicate).single
single() single
singleOrDefault(T, Func1<? super T, Boolean>) 使用 filter(predicate).singleOrElse(default)
singleOrDefault(T) singleOrElse(=> U)
skip(Long, TimeUnit, Scheduler) drop(Duration, Scheduler)
skip(Int) drop(Int)
skip(Long, TimeUnit) drop(Duration)
skipLast(Long, TimeUnit, Scheduler) dropRight(Duration, Scheduler)
skipLast(Long, TimeUnit) dropRight(Duration)
skipLast(Int) dropRight(Int)
skipUntil(Observable<U>) dropUntil(Observable[Any])
skipWhile(Func1<? super T, Boolean>) dropWhile(T => Boolean)
startWith(Iterable<T>) 使用 Observable.from(iterable) ++ o
startWith(T, T)
startWith(T, T, T)
startWith(T, T, T, T)
startWith(T, T, T, T, T)
startWith(T, T, T, T, T, T)
startWith(T, T, T, T, T, T, T)
startWith(T, T, T, T, T, T, T, T)
startWith(T, T, T, T, T, T, T, T, T)
使用 Observable.just(...) ++ o
startWith(T) 使用 item +: o
startWith(Observable<T>) 使用 ++
subscribe(Action1<? super T>, Action1<Throwable>) subscribe(T => Unit, Throwable => Unit)
subscribe(Action1<? super T>, Action1<Throwable>, Action0) subscribe(T => Unit, Throwable => Unit, () => Unit)
subscribe() subscribe()
subscribe(Action1<? super T>) subscribe(T => Unit)
subscribe(Subscriber<? super T>) subscribe(Subscriber[T])
subscribe(Observer<? super T>) subscribe(Observer[T])
subscribeOn(Scheduler) subscribeOn(Scheduler)
switchIfEmpty(Observable<? extends T>) switchIfEmpty(Observable[U])
switchMap(Func1<? super T, ? extends Observable<? extends R>>) switchMap(T => Observable[R])
switchOnNext(Observable<? extends Observable<? extends T>>) switch(<:<[Observable[T], Observable[Observable[U]]])
take(Long, TimeUnit, Scheduler) take(Duration, Scheduler)
take(Int) take(Int)
take(Long, TimeUnit) take(Duration)
takeFirst(Func1<? super T, Boolean>) 使用 filter(condition).take(1)
takeLast(Int, Long, TimeUnit) takeRight(Int, Duration)
takeLast(Long, TimeUnit, Scheduler) takeRight(Duration, Scheduler)
takeLast(Int, Long, TimeUnit, Scheduler) takeRight(Int, Duration, Scheduler)
takeLast(Long, TimeUnit) takeRight(Duration)
takeLast(Int) takeRight(Int)
takeLastBuffer(Int)
takeLastBuffer(Int, Long, TimeUnit)
takeLastBuffer(Int, Long, TimeUnit, Scheduler)
takeLastBuffer(Long, TimeUnit)
takeLastBuffer(Long, TimeUnit, Scheduler)
使用 takeRight(...).toSeq
takeUntil(Func1<? super T, Boolean>) takeUntil(T => Boolean)
takeUntil(Observable<? extends E>) takeUntil(Observable[Any])
takeWhile(Func1<? super T, Boolean>) takeWhile(T => Boolean)
throttleFirst(Long, TimeUnit) throttleFirst(Duration)
throttleFirst(Long, TimeUnit, Scheduler) throttleFirst(Duration, Scheduler)
throttleLast(Long, TimeUnit) throttleLast(Duration)
throttleLast(Long, TimeUnit, Scheduler) throttleLast(Duration, Scheduler)
throttleWithTimeout(Long, TimeUnit, Scheduler) throttleWithTimeout(Duration, Scheduler)
throttleWithTimeout(Long, TimeUnit) throttleWithTimeout(Duration)
timeInterval() timeInterval
timeInterval(Scheduler) timeInterval(Scheduler)
timeout(...) timeout(T => Observable[Any], Observable[U])
timeout(...) timeout(() => Observable[Any], T => Observable[Any])
timeout(Func1<? super T, ? extends Observable<V>>) timeout(T => Observable[Any])
timeout(Long, TimeUnit, Observable<? extends T>) timeout(Duration, Observable[U])
timeout(Long, TimeUnit, Observable<? extends T>, Scheduler) timeout(Duration, Observable[U], Scheduler)
timeout(Long, TimeUnit) timeout(Duration)
timeout(...) timeout(() => Observable[Any], T => Observable[Any], Observable[U])
timeout(Long, TimeUnit, Scheduler) timeout(Duration, Scheduler)
timer(Long, TimeUnit, Scheduler) timer(Duration, Scheduler)
timer(Long, TimeUnit) timer(Duration)
timestamp(Scheduler) timestamp(Scheduler)
timestamp() timestamp
toBlocking() toBlocking
toList() toSeq
toMap(...) toMap(T => K, T => V)
toMap(Func1<? super T, ? extends K>) toMap(T => K)
toMap(...) mapFactory 不需要,因为 Scala 有 CanBuildFrom
toMultimap(...) RxScala 中的 toMultiMap 返回 mutable.MultiMap。它是一个 Map[A, mutable.Set[B]]。可以覆盖 def makeSet: Set[B] 来创建一个自定义 Set。
toMultimap(Func1<? super T, ? extends K>) toMultiMap(T => K)
toMultimap(...) toMultiMap(T => K, T => V, => M)
toMultimap(...) toMultiMap(T => K, T => V)
toSingle() 待办事项
toSortedList(Func2<? super T, ? super T, Integer>)
toSortedList(Func2<? super T, ? super T, Integer>, Int)
Scala 的集合库中已经实现了排序功能,使用 .toSeq.map(_.sortWith(f))
toSortedList()
toSortedList(Int)
Scala 的集合库中已经实现了排序功能,使用 .toSeq.map(_.sorted)
unsafeSubscribe(Subscriber<? super T>) unsafeSubscribe(Subscriber[T])
unsubscribeOn(Scheduler) unsubscribeOn(Scheduler)
using(...)
using(...)
using(=> Resource)(Resource => Observable[T], Resource => Unit, Boolean)
window(Long, TimeUnit, Scheduler) tumbling(Duration, Scheduler)
window(Func0<? extends Observable<? extends TClosing>>)
window(Observable<U>)
tumbling(=> Observable[Any])
window(Int) tumbling(Int)
window(Long, Long, TimeUnit) sliding(Duration, Duration)
window(Int, Int) sliding(Int, Int)
window(Long, Long, TimeUnit, Int, Scheduler) sliding(Duration, Duration, Int, Scheduler)
window(Long, TimeUnit, Int, Scheduler) tumbling(Duration, Int, Scheduler)
window(Long, Long, TimeUnit, Scheduler) sliding(Duration, Duration, Scheduler)
window(...) sliding(Observable[Opening])(Opening => Observable[Any])
window(Long, TimeUnit) tumbling(Duration)
window(Long, TimeUnit, Int) tumbling(Duration, Int)
withLatestFrom(...) withLatestFrom(Observable[U])((T, U) => R)
zip(...) 使用实例方法 zipmap
zip(Iterable<? extends Observable<_>>, FuncN<? extends R>)
zip(Observable<? extends Observable<_>>, FuncN<? extends R>)
使用伴随对象中的 zipmap
zip(...)
zip(...)
zip(...)
zip(...)
zip(...)
zip(...)
zip(...)
在 Scala 中被认为是无必要的。
zipWith(...) zipWith(Iterable[U])((T, U) => R)
zipWith(...) zipWith(Observable[U])((T, U) => R)

Scala BlockingObservable 和 Java BlockingObservable 的比较

Java 方法 Scala 方法
first() first
first(Func1<? super T, Boolean>) 使用 Observable.filter(p).toBlocking.head
firstOrDefault(T, Func1<? super T, Boolean>) 使用 Observable.filter(p).toBlocking.headOrElse(=> U)
firstOrDefault(T) headOrElse(=> U)
forEach(Action1<? super T>) foreach(T => Unit)
from(Observable<? extends T>) 使用 Observable.toBlocking
getIterator() 使用 toIterable.toIterator
last() last
last(Func1<? super T, Boolean>) 使用 Observable.filter(p).toBlocking.last
lastOrDefault(T, Func1<? super T, Boolean>) 使用 Observable.filter(p).toBlocking.lastOrElse(=> U)
lastOrDefault(T) lastOrElse(=> U)
latest() latest
mostRecent(T) mostRecent(U)
next() next
single() single
single(Func1<? super T, Boolean>) 使用 Observable.filter(p).toBlocking.single
singleOrDefault(T) singleOrElse(=> U)
singleOrDefault(T, Func1<? super T, Boolean>) 使用 Observable.filter(p).toBlocking.singleOrElse(=> U)
subscribe(Action1<? super T>, Action1<? super Throwable>) subscribe(T => Unit, Throwable => Unit)
subscribe(...) subscribe(T => Unit, Throwable => Unit, () => Unit)
subscribe() subscribe()
subscribe(Action1<? super T>) subscribe(T => Unit)
subscribe(Subscriber<? super T>) subscribe(Subscriber[T])
subscribe(Observer<? super T>) subscribe(Observer[T])
toFuture() toFuture
toIterable() toIterable

Scala TestScheduler 和 Java TestScheduler 的比较

Java 方法 Scala 方法
advanceTimeBy(Long, TimeUnit) advanceTimeBy(Duration)
advanceTimeTo(Long, TimeUnit) advanceTimeTo(Duration)
createWorker() createWorker
now() now
triggerActions() triggerActions()

Scala TestSubscriber 和 Java TestSubscriber 的比较

Java 方法 Scala 方法
add(Subscription) add(Subscription)
assertCompleted() assertCompleted()
assertError(Class<? extends Throwable>) assertError(Class[_ <: Throwable])
assertError(Throwable) assertError(Throwable)
assertNoErrors() assertNoErrors()
assertNoTerminalEvent() assertNoTerminalEvent()
assertNoValues() assertNoValues()
assertNotCompleted() assertNotCompleted()
assertReceivedOnNext(List<T>) assertValues(T*)
assertTerminalEvent() assertTerminalEvent()
assertUnsubscribed() assertUnsubscribed()
assertValue(T) assertValue(T)
assertValueCount(Int) assertValueCount(Int)
assertValues(T*) assertValues(T*)
awaitTerminalEvent() awaitTerminalEvent()
awaitTerminalEvent(Long, TimeUnit) awaitTerminalEvent(Duration)
awaitTerminalEventAndUnsubscribeOnTimeout(Long, TimeUnit) awaitTerminalEventAndUnsubscribeOnTimeout(Duration)
create() apply()
create(Observer<T>) apply(Observer[T])
create(Long) apply(Long)
create(Subscriber<T>) apply(Subscriber[T])
create(Observer<T>, Long) apply(Observer[T], Long)
getLastSeenThread() getLastSeenThread
getOnCompletedEvents() assertCompleted()
getOnErrorEvents() getOnErrorEvents
getOnNextEvents() getOnNextEvents
isUnsubscribed() isUnsubscribed
onCompleted() onCompleted()
onError(Throwable) onError(Throwable)
onNext(T) onNext(T)
onStart() onStart()
requestMore(Long) requestMore(Long)
setProducer(Producer) setProducer(Producer)
unsubscribe() unsubscribe()

这些表格是在 2016 年 1 月 30 日星期六下午 5:13:09 PST 生成。请勿编辑。请编辑 rx.lang.scala.completeness.CompletenessTables 并运行 sbt 'test:run rx.lang.scala.completeness.CompletenessTables' 来生成这些表格。