本文整理了Java中io.reactivex.common.Notification.isError()
方法的一些代码示例,展示了Notification.isError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Notification.isError()
方法的具体详情如下:
包路径:io.reactivex.common.Notification
类名称:Notification
方法名:isError
[英]Checks if the given object represents a error notification.
[中]检查给定对象是否表示错误通知。
代码示例来源:origin: com.github.akarnokd/rxjava3-common
/**
* Returns true if this notification is an onNext signal and
* {@link #getValue()} returns the contained value.
* @return true if this notification is an onNext signal
* @see #getValue()
*/
public boolean isOnNext() {
Object o = value;
return o != null && !isError(o);
}
代码示例来源:origin: com.github.akarnokd.rxjava3/rxjava3-common
/**
* Returns true if this notification is an onError signal and
* {@link #getError()} returns the contained Throwable.
* @return true if this notification is an onError signal
* @see #getError()
*/
public boolean isOnError() {
return isError(value);
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Returns true if this notification is an onNext signal and
* {@link #getValue()} returns the contained value.
* @return true if this notification is an onNext signal
* @see #getValue()
*/
public boolean isOnNext() {
Object o = value;
return o != null && !isError(o);
}
代码示例来源:origin: com.github.akarnokd/rxjava3-common
/**
* Returns true if this notification is an onError signal and
* {@link #getError()} returns the contained Throwable.
* @return true if this notification is an onError signal
* @see #getError()
*/
public boolean isOnError() {
return isError(value);
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Returns true if this notification is an onError signal and
* {@link #getError()} returns the contained Throwable.
* @return true if this notification is an onError signal
* @see #getError()
*/
public boolean isOnError() {
return isError(value);
}
代码示例来源:origin: com.github.akarnokd.rxjava3/rxjava3-common
/**
* Returns true if this notification is an onNext signal and
* {@link #getValue()} returns the contained value.
* @return true if this notification is an onNext signal
* @see #getValue()
*/
public boolean isOnNext() {
Object o = value;
return o != null && !isError(o);
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Override
public String toString() {
Object o = value;
if (o == null) {
return "OnCompleteNotification";
}
if (isError(o)) {
return "OnErrorNotification[" + getError(o) + "]";
}
return "OnNextNotification[" + value + "]";
}
代码示例来源:origin: com.github.akarnokd.rxjava3/rxjava3-common
@Override
public String toString() {
Object o = value;
if (o == null) {
return "OnCompleteNotification";
}
if (isError(o)) {
return "OnErrorNotification[" + getError(o) + "]";
}
return "OnNextNotification[" + value + "]";
}
代码示例来源:origin: com.github.akarnokd/rxjava3-common
@Override
public String toString() {
Object o = value;
if (o == null) {
return "OnCompleteNotification";
}
if (isError(o)) {
return "OnErrorNotification[" + getError(o) + "]";
}
return "OnNextNotification[" + value + "]";
}
代码示例来源:origin: com.github.akarnokd/rxjava3-common
/**
* Returns the contained value if this notification is an onNext
* signal, null otherwise.
* @return the value contained or null
* @see #isOnNext()
*/
@SuppressWarnings("unchecked")
@Nullable
public T getValue() {
Object o = value;
if (o != null && !isError(o)) {
return (T)value;
}
return null;
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Returns the contained value if this notification is an onNext
* signal, null otherwise.
* @return the value contained or null
* @see #isOnNext()
*/
@SuppressWarnings("unchecked")
@Nullable
public T getValue() {
Object o = value;
if (o != null && !isError(o)) {
return (T)value;
}
return null;
}
代码示例来源:origin: com.github.akarnokd.rxjava3/rxjava3-common
/**
* Returns the contained value if this notification is an onNext
* signal, null otherwise.
* @return the value contained or null
* @see #isOnNext()
*/
@SuppressWarnings("unchecked")
@Nullable
public T getValue() {
Object o = value;
if (o != null && !isError(o)) {
return (T)value;
}
return null;
}
代码示例来源:origin: akarnokd/RxJava3-preview
/**
* Returns the container Throwable error if this notification is an onError
* signal, null otherwise.
* @return the Throwable error contained or null
* @see #isOnError()
*/
@Nullable
public Throwable getError() {
Object o = value;
if (isError(o)) {
return getError(o);
}
return null;
}
代码示例来源:origin: com.github.akarnokd/rxjava3-common
/**
* Returns the container Throwable error if this notification is an onError
* signal, null otherwise.
* @return the Throwable error contained or null
* @see #isOnError()
*/
@Nullable
public Throwable getError() {
Object o = value;
if (isError(o)) {
return getError(o);
}
return null;
}
代码示例来源:origin: com.github.akarnokd.rxjava3/rxjava3-common
/**
* Returns the container Throwable error if this notification is an onError
* signal, null otherwise.
* @return the Throwable error contained or null
* @see #isOnError()
*/
@Nullable
public Throwable getError() {
Object o = value;
if (isError(o)) {
return getError(o);
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!