Class OperatorDistinct<T,U>

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

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

    • keySelector

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

    • OperatorDistinct

      public OperatorDistinct(Func1<? super T,? extends U> keySelector)
  • Method Details

    • instance

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

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