src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.SPECIAL) // may trigger UNBOUNDED_IN
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Flowable<T> take(long count) {
        if (count < 0) {
            throw new IllegalArgumentException("count >= 0 required but it was " + count);
        }
        return RxJavaPlugins.onAssembly(new FlowableTake<T>(this, count));
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.SPECIAL) // may trigger UNBOUNDED_IN
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Flowable<T> take(long count) {
        if (count < 0) {
            throw new IllegalArgumentException("count >= 0 required but it was " + count);
        }
        return RxJavaPlugins.onAssembly(new FlowableTake<T>(this, count));
    }
@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . SPECIAL ) // may trigger UNBOUNDED_IN @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > take ( long count ) { if ( count < 0 ) { throw new IllegalArgumentException ( "count >= 0 required but it was " + count ) ; } return RxJavaPlugins . onAssembly ( new FlowableTake < T > ( this , count ) ) ; }
Returns a Flowable that emits only the first {@code count} items emitted by the source Publisher. If the source emits fewer than
{@code count} items then all of its items are emitted.
<p>
<img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/take.png" alt="">
<p>
This method returns a Publisher that will invoke a subscribing {@link Subscriber}'s
{@link Subscriber#onNext onNext} function a maximum of {@code count} times before invoking
{@link Subscriber#onComplete onComplete}.
<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 in case the first request is smaller than the {@code count}. Otherwise, the source {@code Publisher}
is consumed in an unbounded manner (i.e., without applying backpressure to it).</dd>
<dt><b>Scheduler:</b></dt>
<dd>This version of {@code take} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param count
the maximum number of items to emit
@return a Flowable that emits only the first {@code count} items emitted by the source Publisher, or
all of the items from the source Publisher if that Publisher emits fewer than {@code count} items
@see <a href="http://reactivex.io/documentation/operators/take.html">ReactiveX operators documentation: Take</a>
Returns a Flowable that emits only the first { @code count } items emitted by the source Publisher . If the source emits fewer than { @code count } items then all of its items are emitted . <p > <img width = 640 height = 305 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / take . png alt = > <p > This method returns a Publisher that will invoke a subscribing { @link Subscriber } s { @link Subscriber#onNext onNext } function a maximum of { @code count } times before invoking { @link Subscriber#onComplete onComplete } . <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 in case the first request is smaller than the { @code count } . Otherwise the source { @code Publisher } is consumed in an unbounded manner ( i . e . without applying backpressure to it ) . < / dd > <dt > <b > Scheduler : < / b > < / dt > <dd > This version of { @code take } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >