@@ -3034,7 +3034,7 @@ public static Observable<Long> rangeLong(long start, long count) {
3034
3034
}
3035
3035
3036
3036
/**
3037
- * Returns an Observable that emits a Boolean value that indicates whether two ObservableSource sequences are the
3037
+ * Returns a Single that emits a Boolean value that indicates whether two ObservableSource sequences are the
3038
3038
* same by comparing the items emitted by each ObservableSource pairwise.
3039
3039
* <p>
3040
3040
* <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/sequenceEqual.png" alt="">
@@ -3049,16 +3049,16 @@ public static Observable<Long> rangeLong(long start, long count) {
3049
3049
* the second ObservableSource to compare
3050
3050
* @param <T>
3051
3051
* the type of items emitted by each ObservableSource
3052
- * @return an Observable that emits a Boolean value that indicates whether the two sequences are the same
3052
+ * @return a Single that emits a Boolean value that indicates whether the two sequences are the same
3053
3053
* @see <a href="http://reactivex.io/documentation/operators/sequenceequal.html">ReactiveX operators documentation: SequenceEqual</a>
3054
3054
*/
3055
3055
@SchedulerSupport(SchedulerSupport.NONE)
3056
- public static <T> Observable <Boolean> sequenceEqual(ObservableSource<? extends T> source1, ObservableSource<? extends T> source2) {
3056
+ public static <T> Single <Boolean> sequenceEqual(ObservableSource<? extends T> source1, ObservableSource<? extends T> source2) {
3057
3057
return sequenceEqual(source1, source2, ObjectHelper.equalsPredicate(), bufferSize());
3058
3058
}
3059
3059
3060
3060
/**
3061
- * Returns an Observable that emits a Boolean value that indicates whether two ObservableSource sequences are the
3061
+ * Returns a Single that emits a Boolean value that indicates whether two ObservableSource sequences are the
3062
3062
* same by comparing the items emitted by each ObservableSource pairwise based on the results of a specified
3063
3063
* equality function.
3064
3064
* <p>
@@ -3076,18 +3076,18 @@ public static <T> Observable<Boolean> sequenceEqual(ObservableSource<? extends T
3076
3076
* a function used to compare items emitted by each ObservableSource
3077
3077
* @param <T>
3078
3078
* the type of items emitted by each ObservableSource
3079
- * @return an Observable that emits a Boolean value that indicates whether the two ObservableSource two sequences
3079
+ * @return a Single that emits a Boolean value that indicates whether the two ObservableSource two sequences
3080
3080
* are the same according to the specified function
3081
3081
* @see <a href="http://reactivex.io/documentation/operators/sequenceequal.html">ReactiveX operators documentation: SequenceEqual</a>
3082
3082
*/
3083
3083
@SchedulerSupport(SchedulerSupport.NONE)
3084
- public static <T> Observable <Boolean> sequenceEqual(ObservableSource<? extends T> source1, ObservableSource<? extends T> source2,
3084
+ public static <T> Single <Boolean> sequenceEqual(ObservableSource<? extends T> source1, ObservableSource<? extends T> source2,
3085
3085
BiPredicate<? super T, ? super T> isEqual) {
3086
3086
return sequenceEqual(source1, source2, isEqual, bufferSize());
3087
3087
}
3088
3088
3089
3089
/**
3090
- * Returns an Observable that emits a Boolean value that indicates whether two ObservableSource sequences are the
3090
+ * Returns a Single that emits a Boolean value that indicates whether two ObservableSource sequences are the
3091
3091
* same by comparing the items emitted by each ObservableSource pairwise based on the results of a specified
3092
3092
* equality function.
3093
3093
* <p>
@@ -3112,17 +3112,17 @@ public static <T> Observable<Boolean> sequenceEqual(ObservableSource<? extends T
3112
3112
* @see <a href="http://reactivex.io/documentation/operators/sequenceequal.html">ReactiveX operators documentation: SequenceEqual</a>
3113
3113
*/
3114
3114
@SchedulerSupport(SchedulerSupport.NONE)
3115
- public static <T> Observable <Boolean> sequenceEqual(ObservableSource<? extends T> source1, ObservableSource<? extends T> source2,
3115
+ public static <T> Single <Boolean> sequenceEqual(ObservableSource<? extends T> source1, ObservableSource<? extends T> source2,
3116
3116
BiPredicate<? super T, ? super T> isEqual, int bufferSize) {
3117
3117
ObjectHelper.requireNonNull(source1, "source1 is null");
3118
3118
ObjectHelper.requireNonNull(source2, "source2 is null");
3119
3119
ObjectHelper.requireNonNull(isEqual, "isEqual is null");
3120
3120
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
3121
- return RxJavaPlugins.onAssembly(new ObservableSequenceEqual <T>(source1, source2, isEqual, bufferSize));
3121
+ return RxJavaPlugins.onAssembly(new ObservableSequenceEqualSingle <T>(source1, source2, isEqual, bufferSize));
3122
3122
}
3123
3123
3124
3124
/**
3125
- * Returns an Observable that emits a Boolean value that indicates whether two ObservableSource sequences are the
3125
+ * Returns a Single that emits a Boolean value that indicates whether two ObservableSource sequences are the
3126
3126
* same by comparing the items emitted by each ObservableSource pairwise.
3127
3127
* <p>
3128
3128
* <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/sequenceEqual.png" alt="">
@@ -3139,11 +3139,11 @@ public static <T> Observable<Boolean> sequenceEqual(ObservableSource<? extends T
3139
3139
* the number of items to prefetch from the first and second source ObservableSource
3140
3140
* @param <T>
3141
3141
* the type of items emitted by each ObservableSource
3142
- * @return an Observable that emits a Boolean value that indicates whether the two sequences are the same
3142
+ * @return a Single that emits a Boolean value that indicates whether the two sequences are the same
3143
3143
* @see <a href="http://reactivex.io/documentation/operators/sequenceequal.html">ReactiveX operators documentation: SequenceEqual</a>
3144
3144
*/
3145
3145
@SchedulerSupport(SchedulerSupport.NONE)
3146
- public static <T> Observable <Boolean> sequenceEqual(ObservableSource<? extends T> source1, ObservableSource<? extends T> source2,
3146
+ public static <T> Single <Boolean> sequenceEqual(ObservableSource<? extends T> source1, ObservableSource<? extends T> source2,
3147
3147
int bufferSize) {
3148
3148
return sequenceEqual(source1, source2, ObjectHelper.equalsPredicate(), bufferSize);
3149
3149
}
@@ -6319,7 +6319,7 @@ public final <K> Observable<T> distinct(Function<? super T, K> keySelector) {
6319
6319
public final <K> Observable<T> distinct(Function<? super T, K> keySelector, Callable<? extends Collection<? super K>> collectionSupplier) {
6320
6320
ObjectHelper.requireNonNull(keySelector, "keySelector is null");
6321
6321
ObjectHelper.requireNonNull(collectionSupplier, "collectionSupplier is null");
6322
- return ObservableDistinct.withCollection (this, keySelector, collectionSupplier);
6322
+ return new ObservableDistinct<T, K> (this, keySelector, collectionSupplier);
6323
6323
}
6324
6324
6325
6325
/**
@@ -6338,7 +6338,7 @@ public final <K> Observable<T> distinct(Function<? super T, K> keySelector, Call
6338
6338
*/
6339
6339
@SchedulerSupport(SchedulerSupport.NONE)
6340
6340
public final Observable<T> distinctUntilChanged() {
6341
- return ObservableDistinct. <T>untilChanged (this);
6341
+ return new ObservableDistinctUntilChanged <T>(this, Functions.equalsPredicate() );
6342
6342
}
6343
6343
6344
6344
/**
@@ -6362,7 +6362,7 @@ public final Observable<T> distinctUntilChanged() {
6362
6362
@SchedulerSupport(SchedulerSupport.NONE)
6363
6363
public final <K> Observable<T> distinctUntilChanged(Function<? super T, K> keySelector) {
6364
6364
ObjectHelper.requireNonNull(keySelector, "keySelector is null");
6365
- return ObservableDistinct.untilChanged (this, keySelector);
6365
+ return new ObservableDistinctUntilChanged<T> (this, Functions.equalsPredicate( keySelector) );
6366
6366
}
6367
6367
6368
6368
/**
0 commit comments