Package rx.internal.operators
Class OperatorDistinctUntilChanged<T,U>
- java.lang.Object
-
- rx.internal.operators.OperatorDistinctUntilChanged<T,U>
-
- Type Parameters:
T
- the value typeU
- the key type
- All Implemented Interfaces:
Func1<Subscriber<? super T>,Subscriber<? super T>>
,Func2<U,U,java.lang.Boolean>
,Function
,Observable.Operator<T,T>
public final class OperatorDistinctUntilChanged<T,U> extends java.lang.Object implements Observable.Operator<T,T>, Func2<U,U,java.lang.Boolean>
Returns an Observable that emits all sequentially distinct items emitted by the source.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
OperatorDistinctUntilChanged.Holder
-
Field Summary
Fields Modifier and Type Field Description (package private) Func2<? super U,? super U,java.lang.Boolean>
comparator
(package private) Func1<? super T,? extends U>
keySelector
-
Constructor Summary
Constructors Constructor Description OperatorDistinctUntilChanged(Func1<? super T,? extends U> keySelector)
OperatorDistinctUntilChanged(Func2<? super U,? super U,java.lang.Boolean> comparator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Subscriber<? super T>
call(Subscriber<? super T> child)
java.lang.Boolean
call(U t1, U t2)
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())
).
-
-
-
Method Detail
-
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 Subscriber<? super T> call(Subscriber<? super T> child)
-
-