本文整理了Java中io.reactivex.annotations.NonNull
类的一些代码示例,展示了NonNull
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull
类的具体详情如下:
包路径:io.reactivex.annotations.NonNull
类名称:NonNull
暂无
代码示例来源:origin: ReactiveX/RxJava
/**
* Ensures that calls to onNext, onError and onComplete are properly serialized.
* @return the serialized ObservableEmitter
*/
@NonNull
ObservableEmitter<T> serialize();
代码示例来源:origin: ReactiveX/RxJava
/**
* Creates the given number of {@link io.reactivex.Scheduler.Worker} instances
* that are possibly backed by distinct threads
* and calls the specified {@code Consumer} with them.
* @param number the number of workers to create, positive
* @param callback the callback to send worker instances to
*/
void createWorkers(int number, @NonNull WorkerCallback callback);
代码示例来源:origin: ReactiveX/RxJava
/**
* Test the given input values and return a boolean.
* @param t1 the first value
* @param t2 the second value
* @return the boolean result
* @throws Exception on error
*/
boolean test(@NonNull T1 t1, @NonNull T2 t2) throws Exception;
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Implement this method in subclasses to handle the incoming {@link SingleObserver}s.
* <p>There is no need to call any of the plugin hooks on the current {@code Single} instance or
* the {@code SingleObserver}; all hooks and basic safeguards have been
* applied by {@link #subscribe(SingleObserver)} before this method gets called.
* @param observer the SingleObserver to handle, not null
*/
protected abstract void subscribeActual(@NonNull SingleObserver<? super T> observer);
代码示例来源:origin: ReactiveX/RxJava
public ObservableWithLatestFromMany(@NonNull ObservableSource<T> source, @NonNull Iterable<? extends ObservableSource<?>> otherIterable, @NonNull Function<? super Object[], R> combiner) {
super(source);
this.otherArray = null;
this.otherIterable = otherIterable;
this.combiner = combiner;
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Applies a function to the upstream Observable and returns an ObservableSource with
* optionally different element type.
* @param upstream the upstream Observable instance
* @return the transformed ObservableSource instance
*/
@NonNull
ObservableSource<Downstream> apply(@NonNull Observable<Upstream> upstream);
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Applies a function to the upstream Maybe and returns a converted value of type {@code R}.
*
* @param upstream the upstream Maybe instance
* @return the converted value
*/
@NonNull
R apply(@NonNull Maybe<T> upstream);
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Notifies the SingleObserver that the {@link Single} has experienced an error condition.
* <p>
* If the {@link Single} calls this method, it will not thereafter call {@link #onSuccess}.
*
* @param e
* the exception encountered by the Single
*/
void onError(@NonNull Throwable e);
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Implementors of this method should make sure everything that needs
* to be visible in {@link #onNext(Object)} is established before
* calling {@link Subscription#request(long)}. In practice this means
* no initialization should happen after the {@code request()} call and
* additional behavior is thread safe in respect to {@code onNext}.
*
* {@inheritDoc}
*/
@Override
void onSubscribe(@NonNull Subscription s);
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Called once if the deferred computation 'throws' an exception.
* @param e the exception, not null.
*/
void onError(@NonNull Throwable e);
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Retrieves the list of exceptions that make up the {@code CompositeException}.
*
* @return the exceptions that make up the {@code CompositeException}, as a {@link List} of {@link Throwable}s
*/
@NonNull
public List<Throwable> getExceptions() {
return exceptions;
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Called for each CompletableObserver that subscribes.
* @param emitter the safe emitter instance, never null
* @throws Exception on error
*/
void subscribe(@NonNull CompletableEmitter emitter) throws Exception;
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Applies a function to the upstream Single and returns a converted value of type {@code R}.
*
* @param upstream the upstream Single instance
* @return the converted value
*/
@NonNull
R apply(@NonNull Single<T> upstream);
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Called for each Subscriber that subscribes.
* @param emitter the safe emitter instance, never null
* @throws Exception on error
*/
void subscribe(@NonNull FlowableEmitter<T> emitter) throws Exception;
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Signal a Throwable exception.
* @param error the Throwable to signal, not null
*/
void onError(@NonNull Throwable error);
代码示例来源:origin: ReactiveX/RxJava
/**
* Notifies the Observer that the {@link Observable} has experienced an error condition.
* <p>
* If the {@link Observable} calls this method, it will not thereafter call {@link #onNext} or
* {@link #onComplete}.
*
* @param e
* the exception encountered by the Observable
*/
void onError(@NonNull Throwable e);
代码示例来源:origin: ReactiveX/RxJava
/**
* Applies a function to the upstream Observable and returns a converted value of type {@code R}.
*
* @param upstream the upstream Observable instance
* @return the converted value
*/
@NonNull
R apply(@NonNull Observable<T> upstream);
}
代码示例来源:origin: ReactiveX/RxJava
@NonNull
@Override
public Disposable scheduleDirect(@NonNull Runnable run, long delay, TimeUnit unit) {
throw new UnsupportedOperationException("This scheduler doesn't support delayed execution");
}
代码示例来源:origin: ReactiveX/RxJava
@NonNull
@Override
public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, TimeUnit unit) {
throw new UnsupportedOperationException("This scheduler doesn't support periodic execution");
}
代码示例来源:origin: ReactiveX/RxJava
@NonNull
@Override
public Disposable schedule(@NonNull Runnable action, long delayTime, @NonNull TimeUnit unit) {
if (disposed) {
return EmptyDisposable.INSTANCE;
}
return poolWorker.scheduleActual(action, delayTime, unit, timed);
}
}
内容来源于网络,如有侵权,请联系作者删除!