/** * Completes in case the upstream signals an error. * @return the new Perhaps instance */ public final Perhaps<T> onErrorComplete() { return onAssembly(new PerhapsOnErrorReturnItem<T>(this, null)); }
/** * Completes in case the upstream signals an error. * @return the new Perhaps instance */ public final Perhaps<T> onErrorComplete() { return onAssembly(new PerhapsOnErrorReturnItem<T>(this, null)); }
/** * If the upstream signals an error, it is replaced by a signal * of the given item and normal completion. * @param item the item to signal in case of an error * @return the new Perhaps instance */ public final Perhaps<T> onErrorReturnItem(T item) { ObjectHelper.requireNonNull(item, "item is null"); return onAssembly(new PerhapsOnErrorReturnItem<T>(this, item)); }
/** * If the upstream signals an error, it is replaced by a signal * of the given item and normal completion. * @param item the item to signal in case of an error * @return the new Perhaps instance */ public final Perhaps<T> onErrorReturnItem(T item) { ObjectHelper.requireNonNull(item, "item is null"); return onAssembly(new PerhapsOnErrorReturnItem<T>(this, item)); }