本文整理了Java中io.reactivex.common.annotations.NonNull.<init>()
方法的一些代码示例,展示了NonNull.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull.<init>()
方法的具体详情如下:
包路径:io.reactivex.common.annotations.NonNull
类名称:NonNull
方法名:<init>
暂无
代码示例来源:origin: akarnokd/RxJava3-preview
PeriodicTask(long firstStartInNanoseconds, @NonNull Runnable decoratedRun,
long firstNowNanoseconds, @NonNull SequentialDisposable sd, long periodInNanoseconds) {
this.decoratedRun = decoratedRun;
this.sd = sd;
this.periodInNanoseconds = periodInNanoseconds;
lastNowNanoseconds = firstNowNanoseconds;
startInNanoseconds = firstStartInNanoseconds;
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Apply some calculation to the input value and return some other value.
* @param t the input value
* @return the output value
* @throws Exception on error
*/
R apply(@NonNull T t) throws Exception;
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Override
@NonNull
public String getMessage() {
return message;
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Returns the time unit of the contained time.
* @return the time unit of the contained time
*/
@NonNull
public TimeUnit unit() {
return unit;
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* 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: akarnokd/RxJava3-preview
@NonNull
@Override
public Disposable schedule(@NonNull Runnable run, long delay, @NonNull TimeUnit unit) {
throw new UnsupportedOperationException("This scheduler doesn't support delayed execution");
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Disposable schedule(@NonNull final Runnable action, long delayTime, @NonNull TimeUnit unit) {
if (disposed) {
return Scheduler.REJECTED;
}
return scheduleActual(action, delayTime, unit, null);
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Wraps the {@code Throwable} before it
* is signalled to the {@code RxJavaCommonPlugins.onError()}
* handler as {@code OnErrorNotImplementedException}.
*
* @param e
* the {@code Throwable} to signal; if null, a NullPointerException is constructed
*/
public OnErrorNotImplementedException(@NonNull Throwable e) {
super(e != null ? e.getMessage() : null, e != null ? e : new NullPointerException());
}
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Disposable schedule(@NonNull final Runnable action, final long delayTime, @NonNull final TimeUnit unit) {
// send a scheduled action to the actionQueue
DelayedAction delayedAction = new DelayedAction(action, delayTime, unit);
actionProcessor.onNext(delayedAction);
return delayedAction;
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Wraps the call to the Scheduler creation function in try-catch and propagates thrown
* checked exceptions as RuntimeException and enforces that result is not null.
* @param f the function to call, not null (not verified). Cannot return null
* @param s the parameter value to the function
* @return the result of the function call, not null
* @throws NullPointerException if the function parameter returns null
*/
@NonNull
static Scheduler applyRequireNonNull(@NonNull Function<? super Callable<Scheduler>, ? extends Scheduler> f, Callable<Scheduler> s) {
return ObjectHelper.requireNonNull(apply(f, s), "Scheduler Callable result can't be null");
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Disposable schedule(@NonNull final Runnable action) {
// send a scheduled action to the actionQueue
ImmediateAction immediateAction = new ImmediateAction(action);
actionProcessor.onNext(immediateAction);
return immediateAction;
}
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Worker createWorker() {
return new ScheduledWorker(executor.get());
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Disposable schedule(@NonNull Runnable run, long delayTime, @NonNull TimeUnit unit) {
if (disposed) {
return REJECTED;
}
final TimedRunnable timedAction = new TimedRunnable(this, time + unit.toNanos(delayTime), run, counter++);
queue.add(timedAction);
return Disposables.fromRunnable(new QueueRemove(timedAction));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Disposable schedule(@NonNull Runnable run) {
if (disposed) {
return REJECTED;
}
final TimedRunnable timedAction = new TimedRunnable(this, 0, run, counter++);
queue.add(timedAction);
return Disposables.fromRunnable(new QueueRemove(timedAction));
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Returns an {@code Observable} that stays connected to this {@code ConnectableObservable} as long as there
* is at least one subscription to this {@code ConnectableObservable}.
*
* @return a {@link Flowable}
* @see <a href="http://reactivex.io/documentation/operators/refcount.html">ReactiveX documentation: RefCount</a>
*/
@NonNull
public Flowable<T> refCount() {
return RxJavaFlowablePlugins.onAssembly(new FlowableRefCount<T>(this));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Disposable schedule(@NonNull Runnable action) {
return w.schedule(action);
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Creates a new AsyncProcessor.
* @param <T> the value type to be received and emitted
* @return the new AsyncProcessor instance
*/
@CheckReturnValue
@NonNull
public static <T> AsyncProcessor<T> create() {
return new AsyncProcessor<T>();
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Disposable schedule(@NonNull final Runnable action, final long delayTime, @NonNull final TimeUnit delayUnit) {
TimeUnit common = delayUnit.compareTo(unit) < 0 ? delayUnit : unit;
long t = common.convert(delayTime, delayUnit) + common.convert(delay, unit);
return actualInner.schedule(action, t, common);
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Filters the source values on each 'rail'.
* <p>
* Note that the same predicate may be called from multiple threads concurrently.
* @param predicate the function returning true to keep a value or false to drop a value
* @return the new ParallelFlowable instance
*/
@CheckReturnValue
public final ParallelFlowable<T> filter(@NonNull Predicate<? super T> predicate) {
ObjectHelper.requireNonNull(predicate, "predicate");
return RxJavaFlowablePlugins.onAssembly(new ParallelFilter<T>(this, predicate));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@NonNull
@Override
public Worker createWorker() {
return new SlowInner(actual.createWorker());
}
内容来源于网络,如有侵权,请联系作者删除!