Tabnine Logo
Present
Code IndexAdd Tabnine to your IDE (free)

How to use
Present
in
com.oath.cyclops.types

Best Java code snippets using com.oath.cyclops.types.Present (Showing top 4 results out of 315)

origin: aol/cyclops

@Override
public boolean equals(final Object obj) {
  if (obj instanceof Nothing) {
    return false;
  }
  else if (obj instanceof None) {
    return  false;
  }
  if (obj instanceof Present)
    return Objects.equals(lazy.get(), ((Present) obj).orElse(null));
  else if (obj instanceof Lazy) {
    return Objects.equals(orElse(null), ((Maybe) obj).orElse(null));
  }
  return false;
}
origin: aol/cyclops

@Override
public boolean equals(final Object obj) {
  if (obj instanceof Nothing) {
    return !isPresent();
  }
  else if (obj instanceof None) {
    return !isPresent();
  }else if (obj instanceof Present && isPresent())
    return Objects.equals(orElse(null), ((Present) obj).orElse(null));
  else if (obj instanceof Lazy) {
    if (isPresent())
      return Objects.equals(orElse(null), ((Maybe) obj).orElse(null));
    else {
      return !((Lazy) obj).isPresent();
    }
  }
  return false;
}
origin: com.oath.cyclops/cyclops

@Override
public boolean equals(final Object obj) {
  if (obj instanceof Nothing) {
    return false;
  }
  else if (obj instanceof None) {
    return  false;
  }
  if (obj instanceof Present)
    return Objects.equals(lazy.get(), ((Present) obj).orElse(null));
  else if (obj instanceof Lazy) {
    return Objects.equals(orElse(null), ((Maybe) obj).orElse(null));
  }
  return false;
}
origin: com.oath.cyclops/cyclops

@Override
public boolean equals(final Object obj) {
  if (obj instanceof Nothing) {
    return !isPresent();
  }
  else if (obj instanceof None) {
    return !isPresent();
  }else if (obj instanceof Present && isPresent())
    return Objects.equals(orElse(null), ((Present) obj).orElse(null));
  else if (obj instanceof Lazy) {
    if (isPresent())
      return Objects.equals(orElse(null), ((Maybe) obj).orElse(null));
    else {
      return !((Lazy) obj).isPresent();
    }
  }
  return false;
}
com.oath.cyclops.typesPresent

Most used methods

  • orElse

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Github Copilot alternatives
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