src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> distinctUntilChanged() {
        return distinctUntilChanged(Functions.identity());
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> distinctUntilChanged() {
        return distinctUntilChanged(Functions.identity());
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > distinctUntilChanged ( ) { return distinctUntilChanged ( Functions . identity ( ) ) ; }
Returns an Observable that emits all items emitted by the source ObservableSource that are distinct from their
immediate predecessors based on {@link Object#equals(Object)} comparison.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/distinctUntilChanged.png" alt="">
<p>
It is recommended the elements' class {@code T} in the flow overrides the default {@code Object.equals()} to provide
meaningful comparison between items as the default Java implementation only considers reference equivalence.
Alternatively, use the {@link #distinctUntilChanged(BiPredicate)} overload and provide a comparison function
in case the class {@code T} can't be overridden with custom {@code equals()} or the comparison itself
should happen on different terms or properties of the class {@code T}.
<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>Scheduler:</b></dt>
<dd>{@code distinctUntilChanged} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@return an Observable that emits those items from the source ObservableSource that are distinct from their
immediate predecessors
@see <a href="http://reactivex.io/documentation/operators/distinct.html">ReactiveX operators documentation: Distinct</a>
@see #distinctUntilChanged(BiPredicate)
Returns an Observable that emits all items emitted by the source ObservableSource that are distinct from their immediate predecessors based on { @link Object#equals ( Object ) } comparison . <p > <img width = 640 height = 310 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / distinctUntilChanged . png alt = > <p > It is recommended the elements class { @code T } in the flow overrides the default { @code Object . equals () } to provide meaningful comparison between items as the default Java implementation only considers reference equivalence . Alternatively use the { @link #distinctUntilChanged ( BiPredicate ) } overload and provide a comparison function in case the class { @code T } can t be overridden with custom { @code equals () } or the comparison itself should happen on different terms or properties of the class { @code T } . <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 > Scheduler : < / b > < / dt > <dd > { @code distinctUntilChanged } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >