Class UnambiguousExactGeneComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.GeneComparator
-
- psidev.psi.mi.jami.utils.comparator.interactor.UnambiguousExactGeneComparator
-
- All Implemented Interfaces:
Comparator<Gene>
public class UnambiguousExactGeneComparator extends GeneComparator
Unambiguous exact gene comparator. It will first use UnambiguousExactInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look at ensembl identifier if both are set. If the ensembl identifiers are not both set, it will look at the ensemblGenome identifiers. If at least one ensemblGemome identifiers is not set, it will look at the entrez/gene id. If at least one entrez/gene id is not set, it will look at the refseq identifiers.- Since:
17/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousExactGeneComparator()Creates a new UnambiguousExactGeneComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanareEquals(Gene gene1, Gene gene2)Use DefaultGeneComparator to know if two genes are equals.intcompare(Gene gene1, Gene gene2)It will first use UnambiguousExactInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look at ensembl identifier if both are set.UnambiguousExactInteractorBaseComparatorgetInteractorComparator()getInteractorComparator-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(Gene gene1, Gene gene2)
It will first use UnambiguousExactInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look at ensembl identifier if both are set. If the ensembl identifiers are not both set, it will look at the ensemblGenome identifiers. If at least one ensemblGemome identifiers is not set, it will look at the entrez/gene id. If at least one entrez/gene id is not set, it will look at the refseq identifiers.- Specified by:
comparein interfaceComparator<Gene>- Overrides:
comparein classGeneComparator- Parameters:
gene1- aGeneobject.gene2- aGeneobject.- Returns:
- a int.
-
getInteractorComparator
public UnambiguousExactInteractorBaseComparator getInteractorComparator()
getInteractorComparator
- Overrides:
getInteractorComparatorin classGeneComparator- Returns:
- a
UnambiguousExactInteractorBaseComparatorobject.
-
-