src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> filter(Predicate<? super T> predicate) {
        ObjectHelper.requireNonNull(predicate, "predicate is null");
        return RxJavaPlugins.onAssembly(new ObservableFilter<T>(this, predicate));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> filter(Predicate<? super T> predicate) {
        ObjectHelper.requireNonNull(predicate, "predicate is null");
        return RxJavaPlugins.onAssembly(new ObservableFilter<T>(this, predicate));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > filter ( Predicate < ? super T > predicate ) { ObjectHelper . requireNonNull ( predicate , "predicate is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableFilter < T > ( this , predicate ) ) ; }
Filters items emitted by an ObservableSource by only emitting those that satisfy a specified predicate.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/filter.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code filter} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param predicate
a function that evaluates each item emitted by the source ObservableSource, returning {@code true}
if it passes the filter
@return an Observable that emits only those items emitted by the source ObservableSource that the filter
evaluates as {@code true}
@see <a href="http://reactivex.io/documentation/operators/filter.html">ReactiveX operators documentation: Filter</a>
Filters items emitted by an ObservableSource by only emitting those that satisfy a specified predicate . <p > <img width = 640 height = 310 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / filter . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code filter } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >