本文整理了Java中io.reactivex.internal.functions.Functions.equalsWith()
方法的一些代码示例,展示了Functions.equalsWith()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Functions.equalsWith()
方法的具体详情如下:
包路径:io.reactivex.internal.functions.Functions
类名称:Functions
方法名:equalsWith
暂无
代码示例来源:origin: ReactiveX/RxJava
/**
* Assert that this TestObserver/TestSubscriber received exactly the specified onError event value.
*
* <p>The comparison is performed via Objects.equals(); since most exceptions don't
* implement equals(), this assertion may fail. Use the {@link #assertError(Class)}
* overload to test against the class of an error instead of an instance of an error
* or {@link #assertError(Predicate)} to test with different condition.
* @param error the error to check
* @return this
* @see #assertError(Class)
* @see #assertError(Predicate)
*/
public final U assertError(Throwable error) {
return assertError(Functions.equalsWith(error));
}
代码示例来源:origin: redisson/redisson
/**
* Assert that this TestObserver/TestSubscriber received exactly the specified onError event value.
*
* <p>The comparison is performed via Objects.equals(); since most exceptions don't
* implement equals(), this assertion may fail. Use the {@link #assertError(Class)}
* overload to test against the class of an error instead of an instance of an error
* or {@link #assertError(Predicate)} to test with different condition.
* @param error the error to check
* @return this;
* @see #assertError(Class)
* @see #assertError(Predicate)
*/
public final U assertError(Throwable error) {
return assertError(Functions.equalsWith(error));
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Returns a Single that emits a Boolean that indicates whether the source ObservableSource emitted a
* specified item.
* <p>
* <img width="640" height="320" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/contains.2.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code contains} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param element
* the item to search for in the emissions from the source ObservableSource
* @return a Single that emits {@code true} if the specified item is emitted by the source ObservableSource,
* or {@code false} if the source ObservableSource completes without emitting that item
* @see <a href="http://reactivex.io/documentation/operators/contains.html">ReactiveX operators documentation: Contains</a>
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<Boolean> contains(final Object element) {
ObjectHelper.requireNonNull(element, "element is null");
return any(Functions.equalsWith(element));
}
代码示例来源:origin: redisson/redisson
/**
* Returns a Single that emits a Boolean that indicates whether the source ObservableSource emitted a
* specified item.
* <p>
* <img width="640" height="320" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/contains.2.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code contains} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param element
* the item to search for in the emissions from the source ObservableSource
* @return a Single that emits {@code true} if the specified item is emitted by the source ObservableSource,
* or {@code false} if the source ObservableSource completes without emitting that item
* @see <a href="http://reactivex.io/documentation/operators/contains.html">ReactiveX operators documentation: Contains</a>
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<Boolean> contains(final Object element) {
ObjectHelper.requireNonNull(element, "element is null");
return any(Functions.equalsWith(element));
}
代码示例来源:origin: ReactiveX/RxJava
/**
* Returns a Single that emits a Boolean that indicates whether the source Publisher emitted a
* specified item.
* <p>
* <img width="640" height="320" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/contains.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream and consumes the source {@code Publisher} in an
* unbounded manner (i.e., without applying backpressure).</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code contains} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param item
* the item to search for in the emissions from the source Publisher
* @return a Flowable that emits {@code true} if the specified item is emitted by the source Publisher,
* or {@code false} if the source Publisher completes without emitting that item
* @see <a href="http://reactivex.io/documentation/operators/contains.html">ReactiveX operators documentation: Contains</a>
*/
@CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<Boolean> contains(final Object item) {
ObjectHelper.requireNonNull(item, "item is null");
return any(Functions.equalsWith(item));
}
代码示例来源:origin: redisson/redisson
/**
* Returns a Single that emits a Boolean that indicates whether the source Publisher emitted a
* specified item.
* <p>
* <img width="640" height="320" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/contains.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream and consumes the source {@code Publisher} in an
* unbounded manner (i.e., without applying backpressure).</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code contains} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param item
* the item to search for in the emissions from the source Publisher
* @return a Flowable that emits {@code true} if the specified item is emitted by the source Publisher,
* or {@code false} if the source Publisher completes without emitting that item
* @see <a href="http://reactivex.io/documentation/operators/contains.html">ReactiveX operators documentation: Contains</a>
*/
@CheckReturnValue
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<Boolean> contains(final Object item) {
ObjectHelper.requireNonNull(item, "item is null");
return any(Functions.equalsWith(item));
}
内容来源于网络,如有侵权,请联系作者删除!