Class GeneComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.GeneComparator
-
- All Implemented Interfaces:
Comparator<Gene>
- Direct Known Subclasses:
UnambiguousExactGeneComparator
,UnambiguousGeneComparator
public class GeneComparator extends Object implements Comparator<Gene>
Unambiguous gene comparator. It will first use UnambiguousInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look at ensembl identifier (the interactor with non null ensembl identifier will always come first). If the ensembl identifiers are not set, it will look at the ensemblGenome identifiers (the interactor with non null ensembl genome identifier will always come first). If the ensemblGemome identifiers are not set, it will look at the entrez/gene id (the interactor with non null entrez/gene id will always come first). If the entrez/gene ids are not set, it will look at the refseq identifiers (the interactor with non null refseq identifier will always come first).- Since:
15/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description GeneComparator(Comparator<Interactor> interactorBaseComparator)
Creates a new UnambiguousGeneComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Gene gene1, Gene gene2)
It will first use UnambiguousInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look at ensembl identifier (the interactor with non null ensembl identifier will always come first).Comparator<Interactor>
getInteractorComparator()
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
-
-
-
-
Constructor Detail
-
GeneComparator
public GeneComparator(Comparator<Interactor> interactorBaseComparator)
Creates a new UnambiguousGeneComparator. It will uses a UnambiguousInteractorBaseComparator to compare interactor properties- Parameters:
interactorBaseComparator
- aComparator
object.
-
-
Method Detail
-
getInteractorComparator
public Comparator<Interactor> getInteractorComparator()
getInteractorComparator
- Returns:
- a
Comparator
object.
-
compare
public int compare(Gene gene1, Gene gene2)
It will first use UnambiguousInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look at ensembl identifier (the interactor with non null ensembl identifier will always come first). If the ensembl identifiers are not set, it will look at the ensemblGenome identifiers (the interactor with non null ensembl genome identifier will always come first). If the ensemblGemome identifiers are not set, it will look at the entrez/gene id (the interactor with non null entrez/gene id will always come first). If the entrez/gene ids are not set, it will look at the refseq identifiers (the interactor with non null refseq identifier will always come first).- Specified by:
compare
in interfaceComparator<Gene>
- Parameters:
gene1
- aGene
object.gene2
- aGene
object.- Returns:
- a int.
-
-