@Test public void testDistinctOfNormalSourceWithKeySelector() { Observable<String> src = Observable.from("a", "B", "c", "C", "c", "B", "b", "a", "E"); Observable.create(distinct(src, TO_UPPER_WITH_EXCEPTION)).subscribe(w); InOrder inOrder = inOrder(w); inOrder.verify(w, times(1)).onNext("a"); inOrder.verify(w, times(1)).onNext("B"); inOrder.verify(w, times(1)).onNext("c"); inOrder.verify(w, times(1)).onNext("E"); inOrder.verify(w, times(1)).onCompleted(); inOrder.verify(w, never()).onNext(anyString()); verify(w, never()).onError(any(Throwable.class)); }
public static <T, U> OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector) { return new Distinct<T, U>(source, keySelector); }
OperationDistinct { public static <T, U> OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector) { return new Distinct<T, U>(source, keySelector); } }
OperationDistinct { public static <T, U> OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector) { return new Distinct<T, U>(source, keySelector); }  }
OperationDistinct { public static <T, U> OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector) { return new Distinct<T, U>(source, keySelector); }  static OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector); static OnSubscribeFunc<T> distinct(Observable<? extends T> source, Comparator<T> equalityComparator); static OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector, Comparator<U> equalityComparator); static OnSubscribeFunc<T> distinct(Observable<? extends T> source); }
OperationDistinct { public static <T, U> OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector) { return new Distinct<T, U>(source, keySelector); }  static OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector); static OnSubscribeFunc<T> distinct(Observable<? extends T> source, Comparator<T> equalityComparator); static OnSubscribeFunc<T> distinct(Observable<? extends T> source, Func1<? super T, ? extends U> keySelector, Comparator<U> equalityComparator); static OnSubscribeFunc<T> distinct(Observable<? extends T> source);  }