src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Observable<Observable<T>> window(long timespan, TimeUnit unit,
            Scheduler scheduler, long count) {
        return window(timespan, unit, scheduler, count, false);
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Observable<Observable<T>> window(long timespan, TimeUnit unit,
            Scheduler scheduler, long count) {
        return window(timespan, unit, scheduler, count, false);
    }
Returns an Observable that emits windows of items it collects from the source ObservableSource. The resulting
ObservableSource emits connected, non-overlapping windows, each of a fixed duration specified by the
{@code timespan} argument or a maximum size specified by the {@code count} argument (whichever is reached
first). When the source ObservableSource completes or encounters an error, the resulting ObservableSource emits the
current window and propagates the notification from the source ObservableSource.
<p>
<img width="640" height="370" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/window6.s.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>You specify which {@link Scheduler} this operator will use.</dd>
</dl>

@param timespan
the period of time each window collects items before it should be emitted and replaced with a
new window
@param unit
the unit of time which applies to the {@code timespan} argument
@param count
the maximum size of each window before it should be emitted
@param scheduler
the {@link Scheduler} to use when determining the end and start of a window
@return an Observable that emits connected, non-overlapping windows of items from the source ObservableSource
that were emitted during a fixed duration of time or when the window has reached maximum capacity
(whichever occurs first)
@see <a href="http://reactivex.io/documentation/operators/window.html">ReactiveX operators documentation: Window</a>