@@ -3823,7 +3823,7 @@ public final Observable<T> defaultIfEmpty(T defaultValue) {
3823
3823
public final <U , V > Observable <T > delay (
3824
3824
Func0 <? extends Observable <U >> subscriptionDelay ,
3825
3825
Func1 <? super T , ? extends Observable <V >> itemDelay ) {
3826
- return create ( new OnSubscribeDelayWithSelector <T , U , V >(this , subscriptionDelay , itemDelay ));
3826
+ return delaySubscription ( subscriptionDelay ). lift ( new OperatorDelayWithSelector <T , V >(this , itemDelay ));
3827
3827
}
3828
3828
3829
3829
/**
@@ -3851,7 +3851,7 @@ public final <U, V> Observable<T> delay(
3851
3851
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.delay.aspx">MSDN: Observable.Delay</a>
3852
3852
*/
3853
3853
public final <U > Observable <T > delay (Func1 <? super T , ? extends Observable <U >> itemDelay ) {
3854
- return create (new OnSubscribeDelayWithSelector < T , U , U >(this , itemDelay ));
3854
+ return lift (new OperatorDelayWithSelector < T , U >(this , itemDelay ));
3855
3855
}
3856
3856
3857
3857
/**
@@ -3897,7 +3897,7 @@ public final Observable<T> delay(long delay, TimeUnit unit) {
3897
3897
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229280.aspx">MSDN: Observable.Delay</a>
3898
3898
*/
3899
3899
public final Observable <T > delay (long delay , TimeUnit unit , Scheduler scheduler ) {
3900
- return create (new OnSubscribeDelay <T >(this , delay , unit , scheduler ));
3900
+ return lift (new OperatorDelay <T >(this , delay , unit , scheduler ));
3901
3901
}
3902
3902
3903
3903
/**
@@ -3943,6 +3943,26 @@ public final Observable<T> delaySubscription(long delay, TimeUnit unit) {
3943
3943
public final Observable <T > delaySubscription (long delay , TimeUnit unit , Scheduler scheduler ) {
3944
3944
return create (new OnSubscribeDelaySubscription <T >(this , delay , unit , scheduler ));
3945
3945
}
3946
+
3947
+ /**
3948
+ * Returns an Observable that delays the subscription to the source Observable by a given amount of time.
3949
+ * <p>
3950
+ * <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/delaySubscription.png" alt="">
3951
+ * <dl>
3952
+ * <dt><b>Scheduler:</b></dt>
3953
+ * <dd>This version of {@code delay} operates by default on the {@code compuation} {@link Scheduler}.</dd>
3954
+ * </dl>
3955
+ *
3956
+ * @param delay
3957
+ * the time to delay the subscription
3958
+ * @param unit
3959
+ * the time unit of {@code delay}
3960
+ * @return an Observable that delays the subscription to the source Observable by the given amount
3961
+ * @see <a href="https://github.com/ReactiveX/RxJava/wiki/Observable-Utility-Operators#delaysubscription">RxJava wiki: delaySubscription</a>
3962
+ */
3963
+ public final <U > Observable <T > delaySubscription (Func0 <? extends Observable <U >> subscriptionDelay ) {
3964
+ return create (new OnSubscribeDelaySubscriptionWithSelector <T , U >(this , subscriptionDelay ));
3965
+ }
3946
3966
3947
3967
/**
3948
3968
* Returns an Observable that reverses the effect of {@link #materialize materialize} by transforming the
0 commit comments