congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ValueSubscriber.orElse
Code IndexAdd Tabnine to your IDE (free)

How to use
orElse
method
in
com.oath.cyclops.types.reactive.ValueSubscriber

Best Java code snippets using com.oath.cyclops.types.reactive.ValueSubscriber.orElse (Showing top 6 results out of 315)

origin: aol/cyclops

public Either<Throwable, T> toEither() {
  if (orElse(null) == null && firstError.get() != UNSET) {
    return Either.left((Throwable) firstError.get());
  }
  return Either.right(orElse(null));
}
origin: aol/cyclops

  public Future<T> toFutureAsync(final Executor ex) {
    return Future.of(()->orElse(null),ex);
  }
}
origin: aol/cyclops

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;
}
origin: com.oath.cyclops/cyclops

public Either<Throwable, T> toEither() {
  if (orElse(null) == null && firstError.get() != UNSET) {
    return Either.left((Throwable) firstError.get());
  }
  return Either.right(orElse(null));
}
origin: com.oath.cyclops/cyclops

  public Future<T> toFutureAsync(final Executor ex) {
    return Future.of(()->orElse(null),ex);
  }
}
origin: com.oath.cyclops/cyclops

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;
}
com.oath.cyclops.types.reactiveValueSubscriberorElse

Popular methods of ValueSubscriber

  • subscriber
  • toEither
  • toMaybe
  • <init>
  • throwingGet
  • toFutureAsync
  • toLazyEither
  • requestOne
  • toIor
  • toTry

Popular in Java

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • Menu (java.awt)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Notification (javax.management)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now