src/main/java/io/reactivex/Flowable.java
@SuppressWarnings({ "rawtypes", "unchecked" })
    @CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Flowable<T> distinct() {
        return distinct((Function)Functions.identity(), Functions.<T>createHashSet());
    }
@SuppressWarnings({ "rawtypes", "unchecked" })
    @CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Flowable<T> distinct() {
        return distinct((Function)Functions.identity(), Functions.<T>createHashSet());
    }
Returns a Flowable that emits all items emitted by the source Publisher 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
a 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 Subscriber 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>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 distinct} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@return a Flowable that emits only those items emitted by the source Publisher 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)