src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Flowable<T> distinctUntilChanged(BiPredicate<? super T, ? super T> comparer) {
        ObjectHelper.requireNonNull(comparer, "comparer is null");
        return RxJavaPlugins.onAssembly(new FlowableDistinctUntilChanged<T, T>(this, Functions.<T>identity(), comparer));
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Flowable<T> distinctUntilChanged(BiPredicate<? super T, ? super T> comparer) {
        ObjectHelper.requireNonNull(comparer, "comparer is null");
        return RxJavaPlugins.onAssembly(new FlowableDistinctUntilChanged<T, T>(this, Functions.<T>identity(), comparer));
    }
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > distinctUntilChanged ( BiPredicate < ? super T , ? super T > comparer ) { ObjectHelper . requireNonNull ( comparer , "comparer is null" ) ; return RxJavaPlugins . onAssembly ( new FlowableDistinctUntilChanged < T , T > ( this , Functions . < T > identity ( ) , comparer ) ) ; }
Returns a Flowable that emits all items emitted by the source Publisher that are distinct from their
immediate predecessors when compared with each other via the provided comparator function.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/distinctUntilChanged.png" alt="">
<p>
Note that the operator always retains the latest item from upstream regardless of the comparison result
and uses it in the next comparison with the next upstream item.
<p>
Note that if element type {@code T} in the flow is mutable, the comparison of the previous and current
item may yield unexpected results if the items are mutated externally. Common cases are mutable
{@code CharSequence}s or {@code List}s where the objects will actually have the same
references when they are modified and {@code distinctUntilChanged} will evaluate subsequent items as same.
To avoid such situation, it is recommended that mutable data is converted to an immutable one,
for example using {@code map(CharSequence::toString)} or {@code map(list -> Collections.unmodifiableList(new ArrayList<>(list)))}.
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator doesn't interfere with backpressure which is determined by the source {@code Publisher}'s
backpressure behavior.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code distinctUntilChanged} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param comparer the function that receives the previous item and the current item and is
expected to return true if the two are equal, thus skipping the current value.
@return a Flowable that emits those items from the source Publisher that are distinct from their
immediate predecessors
@see <a href="http://reactivex.io/documentation/operators/distinct.html">ReactiveX operators documentation: Distinct</a>
@since 2.0
Returns a Flowable that emits all items emitted by the source Publisher that are distinct from their immediate predecessors when compared with each other via the provided comparator function . <p > <img width = 640 height = 310 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / distinctUntilChanged . png alt = > <p > Note that the operator always retains the latest item from upstream regardless of the comparison result and uses it in the next comparison with the next upstream item . <p > Note that if element type { @code T } in the flow is mutable the comparison of the previous and current item may yield unexpected results if the items are mutated externally . Common cases are mutable { @code CharSequence } s or { @code List } s where the objects will actually have the same references when they are modified and { @code distinctUntilChanged } will evaluate subsequent items as same . To avoid such situation it is recommended that mutable data is converted to an immutable one for example using { @code map ( CharSequence :: toString ) } or { @code map ( list - > Collections . unmodifiableList ( new ArrayList< > ( list ))) } . <dl > <dt > <b > Backpressure : < / b > < / dt > <dd > The operator doesn t interfere with backpressure which is determined by the source { @code Publisher } s backpressure behavior . < / dd > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code distinctUntilChanged } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >