Tabnine Logo
InteractorXref.equals
Code IndexAdd Tabnine to your IDE (free)

How to use
equals
method
in
uk.ac.ebi.intact.model.InteractorXref

Best Java code snippets using uk.ac.ebi.intact.model.InteractorXref.equals (Showing top 2 results out of 315)

origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Check if two interactors contain the same identity xrefs, excluding the IMEx partner identities
 *
 * @param interactor1
 * @param interactor2
 * @return
 */
public static boolean containTheSameIdentities(Interactor interactor1, Interactor interactor2) {
  List<InteractorXref> identities1 = getIdentityXrefs(interactor1, true);
  List<InteractorXref> identities2 = getIdentityXrefs(interactor2, true);
  if (identities1.size() != identities2.size()) {
    return false;
  }
  Comparator<InteractorXref> identityXrefComparator = new Comparator<InteractorXref>() {
    public int compare(InteractorXref o1, InteractorXref o2) {
      return o1.getPrimaryId().compareTo(o2.getPrimaryId());
    }
  };
  Collections.sort(identities1, identityXrefComparator);
  Collections.sort(identities2, identityXrefComparator);
  for (int i = 0; i < identities1.size(); i++) {
    if (!(identities1.get(i).equals(identities2.get(i)))) {
      return false;
    }
  }
  return true;
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Check if two interactors contain the same identity xrefs, excluding the IMEx partner identities
 *
 * @param interactor1
 * @param interactor2
 * @return
 */
public static boolean containTheSameIdentities(Interactor interactor1, Interactor interactor2) {
  List<InteractorXref> identities1 = getIdentityXrefs(interactor1, true);
  List<InteractorXref> identities2 = getIdentityXrefs(interactor2, true);
  if (identities1.size() != identities2.size()) {
    return false;
  }
  Comparator<InteractorXref> identityXrefComparator = new Comparator<InteractorXref>() {
    public int compare(InteractorXref o1, InteractorXref o2) {
      return o1.getPrimaryId().compareTo(o2.getPrimaryId());
    }
  };
  Collections.sort(identities1, identityXrefComparator);
  Collections.sort(identities2, identityXrefComparator);
  for (int i = 0; i < identities1.size(); i++) {
    if (!(identities1.get(i).equals(identities2.get(i)))) {
      return false;
    }
  }
  return true;
}
uk.ac.ebi.intact.modelInteractorXrefequals

Popular methods of InteractorXref

  • getCvXrefQualifier
  • getCvDatabase
  • getPrimaryId
  • <init>
  • getParent
  • setCvXrefQualifier

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 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