public Future<T> toFutureAsync(final Executor ex) { return Future.of(()->orElse(null),ex); } }
public Ior<Throwable, T> toIor() { orElse(null); Ior<Throwable, T> secondary = null; Ior<Throwable, T> primary = null; if (firstError.get() != UNSET) { secondary = Ior.<Throwable, T>left((Throwable) firstError.get()); } if (firstValue.get() != UNSET) { primary = Ior.<Throwable, T>right((T) firstValue.get()); } if (secondary != null && primary != null) return Ior.both((Throwable)firstError.get(), (T) firstValue.get()); if (primary != null) return primary; return secondary; }
public Future<T> toFutureAsync(final Executor ex) { return Future.of(()->orElse(null),ex); } }
public Ior<Throwable, T> toIor() { orElse(null); Ior<Throwable, T> secondary = null; Ior<Throwable, T> primary = null; if (firstError.get() != UNSET) { secondary = Ior.<Throwable, T>left((Throwable) firstError.get()); } if (firstValue.get() != UNSET) { primary = Ior.<Throwable, T>right((T) firstValue.get()); } if (secondary != null && primary != null) return Ior.both((Throwable)firstError.get(), (T) firstValue.get()); if (primary != null) return primary; return secondary; }