src/main/java/io/reactivex/Maybe.java
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U> Maybe<U> ofType(final Class<U> clazz) {
        ObjectHelper.requireNonNull(clazz, "clazz is null");
        return filter(Functions.isInstanceOf(clazz)).cast(clazz);
    }
@CheckReturnValue
    @NonNull
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U> Maybe<U> ofType(final Class<U> clazz) {
        ObjectHelper.requireNonNull(clazz, "clazz is null");
        return filter(Functions.isInstanceOf(clazz)).cast(clazz);
    }
@ CheckReturnValue @ NonNull @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U > Maybe < U > ofType ( final Class < U > clazz ) { ObjectHelper . requireNonNull ( clazz , "clazz is null" ) ; return filter ( Functions . isInstanceOf ( clazz ) ) . cast ( clazz ) ; }
Filters the items emitted by a Maybe, only emitting its success value if that
is an instance of the supplied Class.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/ofClass.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code ofType} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <U> the output type
@param clazz
the class type to filter the items emitted by the source Maybe
@return the new Maybe instance
@see <a href="http://reactivex.io/documentation/operators/filter.html">ReactiveX operators documentation: Filter</a>
Filters the items emitted by a Maybe only emitting its success value if that is an instance of the supplied Class . <p > <img width = 640 height = 310 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / ofClass . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code ofType } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >