src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> distinct() {
        return distinct(Functions.identity(), Functions.createHashSet());
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> distinct() {
        return distinct(Functions.identity(), Functions.createHashSet());
    }
Returns an Observable that emits all items emitted by the source ObservableSource that are distinct
based on {@link Object#equals(Object)} comparison.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/distinct.png" alt="">
<p>
It is recommended the elements' class {@code T} in the flow overrides the default {@code Object.equals()}
and {@link Object#hashCode()} to provide meaningful comparison between items as the default Java
implementation only considers reference equivalence.
<p>
By default, {@code distinct()} uses an internal {@link java.util.HashSet} per Observer to remember
previously seen items and uses {@link java.util.Set#add(Object)} returning {@code false} as the
indicator for duplicates.
<p>
Note that this internal {@code HashSet} may grow unbounded as items won't be removed from it by
the operator. Therefore, using very long or infinite upstream (with very distinct elements) may lead
to {@code OutOfMemoryError}.
<p>
Customizing the retention policy can happen only by providing a custom {@link java.util.Collection} implementation
to the {@link #distinct(Function, Callable)} overload.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code distinct} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@return an Observable that emits only those items emitted by the source ObservableSource that are distinct from
each other
@see <a href="http://reactivex.io/documentation/operators/distinct.html">ReactiveX operators documentation: Distinct</a>
@see #distinct(Function)
@see #distinct(Function, Callable)