src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <K> Flowable<T> distinct(Function<? super T, K> keySelector,
            Callable<? extends Collection<? super K>> collectionSupplier) {
        ObjectHelper.requireNonNull(keySelector, "keySelector is null");
        ObjectHelper.requireNonNull(collectionSupplier, "collectionSupplier is null");
        return RxJavaPlugins.onAssembly(new FlowableDistinct<T, K>(this, keySelector, collectionSupplier));
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <K> Flowable<T> distinct(Function<? super T, K> keySelector,
            Callable<? extends Collection<? super K>> collectionSupplier) {
        ObjectHelper.requireNonNull(keySelector, "keySelector is null");
        ObjectHelper.requireNonNull(collectionSupplier, "collectionSupplier is null");
        return RxJavaPlugins.onAssembly(new FlowableDistinct<T, K>(this, keySelector, collectionSupplier));
    }
Returns a Flowable that emits all items emitted by the source Publisher that are distinct according
to a key selector function and based on {@link Object#equals(Object)} comparison of the objects
returned by the key selector function.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/distinct.key.png" alt="">
<p>
It is recommended the keys' class {@code K} overrides the default {@code Object.equals()} and {@link Object#hashCode()} to provide
a meaningful comparison between the key objects as the default Java implementation only considers reference equivalence.
<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>

@param <K> the key type
@param keySelector
a function that projects an emitted item to a key value that is used to decide whether an item
is distinct from another one or not
@param collectionSupplier
function called for each individual Subscriber to return a Collection subtype for holding the extracted
keys and whose add() method's return indicates uniqueness.
@return a Flowable that emits those items emitted by the source Publisher that have distinct keys
@see <a href="http://reactivex.io/documentation/operators/distinct.html">ReactiveX operators documentation: Distinct</a>