Class OperatorDistinctUntilChanged<T,U>

java.lang.Object
rx.internal.operators.OperatorDistinctUntilChanged<T,U>
Type Parameters:
T - the value type
U - the key type
All Implemented Interfaces:
Func1<Subscriber<? super T>,Subscriber<? super T>>, Func2<U,U,Boolean>, Function, Observable.Operator<T,T>

public final class OperatorDistinctUntilChanged<T,U> extends Object implements Observable.Operator<T,T>, Func2<U,U,Boolean>
Returns an Observable that emits all sequentially distinct items emitted by the source.
  • Field Details

    • keySelector

      final Func1<? super T,? extends U> keySelector
    • comparator

      final Func2<? super U,? super U,Boolean> comparator
  • Constructor Details

    • OperatorDistinctUntilChanged

      public OperatorDistinctUntilChanged(Func1<? super T,? extends U> keySelector)
    • OperatorDistinctUntilChanged

      public OperatorDistinctUntilChanged(Func2<? super U,? super U,Boolean> comparator)
  • Method Details

    • instance

      public static <T> OperatorDistinctUntilChanged<T,T> instance()
      Returns a singleton instance of OperatorDistinctUntilChanged that was built using the identity function for comparison (new OperatorDistinctUntilChanged(UtilityFunctions.identity())).
      Type Parameters:
      T - the value type
      Returns:
      Operator that emits sequentially distinct values only using the identity function for comparison
    • call

      public Boolean call(U t1, U t2)
      Specified by:
      call in interface Func2<U,U,Boolean>
    • call

      public Subscriber<? super T> call(Subscriber<? super T> child)
      Specified by:
      call in interface Func1<T,U>