@@ -45,6 +45,7 @@ class CompletenessTest extends JUnitSuite {
45
45
val commentForFirstWithPredicate = " [use `.filter(condition).first`]"
46
46
val fromFuture = " [TODO: Decide how Scala Futures should relate to Observables. Should there be a " +
47
47
" common base interface for Future and Observable? And should Futures also have an unsubscribe method?]"
48
+ val commentForTakeLastBuffer = " [use `takeRight(...).toSeq`]"
48
49
49
50
/**
50
51
* Maps each method from the Java Observable to its corresponding method in the Scala Observable
@@ -71,8 +72,14 @@ class CompletenessTest extends JUnitSuite {
71
72
" all(Func1[_ >: T, Boolean])" -> " forall(T => Boolean)" ,
72
73
" buffer(Long, Long, TimeUnit)" -> " buffer(Duration, Duration)" ,
73
74
" buffer(Long, Long, TimeUnit, Scheduler)" -> " buffer(Duration, Duration, Scheduler)" ,
75
+ " buffer(Func0[_ <: Observable[_ <: TClosing]])" -> " buffer(() => Observable[Any])" ,
76
+ " buffer(Observable[B])" -> " buffer(Observable[Any])" ,
77
+ " buffer(Observable[B], Int)" -> " buffer(Observable[Any], Int)" ,
78
+ " buffer(Observable[_ <: TOpening], Func1[_ >: TOpening, _ <: Observable[_ <: TClosing]])" -> " buffer(Observable[Opening], Opening => Observable[Any])" ,
74
79
" contains(T)" -> " contains(Any)" ,
75
80
" count()" -> " length" ,
81
+ " delay(Func0[_ <: Observable[U]], Func1[_ >: T, _ <: Observable[V]])" -> " delay(() => Observable[Any], T => Observable[Any])" ,
82
+ " delay(Func1[_ >: T, _ <: Observable[U]])" -> " delay(T => Observable[Any])" ,
76
83
" dematerialize()" -> " dematerialize(<:<[Observable[T], Observable[Notification[U]]])" ,
77
84
" elementAt(Int)" -> " [use `.drop(index).first`]" ,
78
85
" elementAtOrDefault(Int, T)" -> " [use `.drop(index).firstOrElse(default)`]" ,
@@ -116,6 +123,15 @@ class CompletenessTest extends JUnitSuite {
116
123
" takeFirst()" -> " first" ,
117
124
" takeFirst(Func1[_ >: T, Boolean])" -> commentForFirstWithPredicate,
118
125
" takeLast(Int)" -> " takeRight(Int)" ,
126
+ " takeLast(Long, TimeUnit)" -> " takeRight(Duration)" ,
127
+ " takeLast(Long, TimeUnit, Scheduler)" -> " takeRight(Duration, Scheduler)" ,
128
+ " takeLast(Int, Long, TimeUnit)" -> " takeRight(Int, Duration)" ,
129
+ " takeLast(Int, Long, TimeUnit, Scheduler)" -> " takeRight(Int, Duration, Scheduler)" ,
130
+ " takeLastBuffer(Int)" -> commentForTakeLastBuffer,
131
+ " takeLastBuffer(Int, Long, TimeUnit)" -> commentForTakeLastBuffer,
132
+ " takeLastBuffer(Int, Long, TimeUnit, Scheduler)" -> commentForTakeLastBuffer,
133
+ " takeLastBuffer(Long, TimeUnit)" -> commentForTakeLastBuffer,
134
+ " takeLastBuffer(Long, TimeUnit, Scheduler)" -> commentForTakeLastBuffer,
119
135
" takeWhileWithIndex(Func2[_ >: T, _ >: Integer, Boolean])" -> " [use `.zipWithIndex.takeWhile{case (elem, index) => condition}.map(_._1)`]" ,
120
136
" timeout(Func0[_ <: Observable[U]], Func1[_ >: T, _ <: Observable[V]], Observable[_ <: T])" -> " timeout(() => Observable[U], T => Observable[V], Observable[O])" ,
121
137
" timeout(Func1[_ >: T, _ <: Observable[V]], Observable[_ <: T])" -> " timeout(() => Observable[U], T => Observable[V])" ,
@@ -154,8 +170,8 @@ class CompletenessTest extends JUnitSuite {
154
170
" range(Int, Int)" -> " apply(Range)" ,
155
171
" repeat()" -> " repeat()" ,
156
172
" retry()" -> " retry()" ,
157
- " sequenceEqual(Observable[_ <: T], Observable[_ <: T])" -> " [use `(first zip second) map (p => p._1 == p._2)`] " ,
158
- " sequenceEqual(Observable[_ <: T], Observable[_ <: T], Func2[_ >: T, _ >: T, Boolean])" -> " [use `(first zip second) map (p => equality(p._1, p._2))`] " ,
173
+ " sequenceEqual(Observable[_ <: T], Observable[_ <: T])" -> " sequenceEqual(Observable[U]) " ,
174
+ " sequenceEqual(Observable[_ <: T], Observable[_ <: T], Func2[_ >: T, _ >: T, Boolean])" -> " sequenceEqual(Observable[U], (U, U) => Boolean) " ,
159
175
" sum(Observable[Integer])" -> " sum(Numeric[U])" ,
160
176
" sumDoubles(Observable[Double])" -> " sum(Numeric[U])" ,
161
177
" sumFloats(Observable[Float])" -> " sum(Numeric[U])" ,
0 commit comments