io.reactivex.common.annotations.NonNull类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中io.reactivex.common.annotations.NonNull类的一些代码示例,展示了NonNull类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull类的具体详情如下:
包路径:io.reactivex.common.annotations.NonNull
类名称:NonNull

NonNull介绍

暂无

代码示例

代码示例来源: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

/**
 * Provides the SingleObserver with the means of cancelling (disposing) the
 * connection (channel) with the Single in both
 * synchronous (from within {@code onSubscribe(Disposable)} itself) and asynchronous manner.
 * @param d the Disposable instance whose {@link Disposable#dispose()} can
 * be called anytime to cancel the connection
 * @since 2.0
 */
void onSubscribe(@NonNull Disposable d);

代码示例来源:origin: akarnokd/RxJava3-preview

/**
 * Notifies the SingleObserver with a single item and that the {@link Single} has finished sending
 * push-based notifications.
 * <p>
 * The {@link Single} will not call this method if it calls {@link #onError}.
 *
 * @param t
 *          the item emitted by the Single
 */
void onSuccess(@NonNull T t);

代码示例来源:origin: akarnokd/RxJava3-preview

@Override
@NonNull
public String getMessage() {
  return message;
}

代码示例来源:origin: akarnokd/RxJava3-preview

/**
   * Applies a function to the upstream Single and returns a SingleSource with
   * optionally different element type.
   * @param upstream the upstream Single instance
   * @return the transformed SingleSource instance
   */
  @NonNull
  SingleSource<Downstream> apply(@NonNull Single<Upstream> upstream);
}

代码示例来源: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

/**
 * Atomically enqueue two values.
 * @param v1 the first value to enqueue, not null
 * @param v2 the second value to enqueue, not null
 * @return true if successful, false if the value was not enqueued
 * likely due to reaching the queue capacity)
 */
boolean offer(@NonNull T v1, @NonNull T v2);

代码示例来源: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

/**
 * Signal a success value.
 * @param t the value, not null
 */
void onSuccess(@NonNull T t);

代码示例来源:origin: akarnokd/RxJava3-preview

/**
   * Applies a function to the child Observer and returns a new parent Observer.
   * @param observer the child Observer instance
   * @return the parent Observer instance
   * @throws Exception on failure
   */
  @NonNull
  Observer<? super Upstream> apply(@NonNull Observer<? super Downstream> observer) throws Exception;
}

代码示例来源:origin: akarnokd/RxJava3-preview

/**
   * Calculate a value based on the input values.
   * @param t1 the first value
   * @param t2 the second value
   * @param t3 the third value
   * @return the result value
   * @throws Exception on error
   */
  @NonNull
  R apply(@NonNull T1 t1, @NonNull T2 t2, @NonNull T3 t3) throws Exception;
}

代码示例来源:origin: akarnokd/RxJava3-preview

/**
   * Called for each Observer that subscribes.
   * @param e the safe emitter instance, never null
   * @throws Exception on error
   */
  void subscribe(@NonNull ObservableEmitter<T> e) throws Exception;
}

代码示例来源:origin: akarnokd/RxJava3-preview

/**
 * Signal a Throwable exception.
 * @param error the Throwable to signal, not null
 */
void onError(@NonNull Throwable error);

代码示例来源: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 schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, TimeUnit unit) {
  throw new UnsupportedOperationException("This scheduler doesn't support periodic 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

/**
 * Constructs a CompositeException with the given array of Throwables as the
 * list of suppressed exceptions.
 * @param exceptions the Throwables to have as initially suppressed exceptions
 *
 * @throws IllegalArgumentException if <code>exceptions</code> is empty.
 */
public CompositeException(@NonNull Throwable... exceptions) {
  this(exceptions == null ?
      Collections.singletonList(new NullPointerException("exceptions was null")) : Arrays.asList(exceptions));
}

代码示例来源: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;
}

相关文章

NonNull类方法