Class ProteinComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.ProteinComparator
-
- All Implemented Interfaces:
Comparator<Protein>
- Direct Known Subclasses:
UnambiguousExactProteinComparator
,UnambiguousProteinComparator
public class ProteinComparator extends Object implements Comparator<Protein>
proteins comparator. It will first use UnambiguousPolymerComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look for uniprotkb identifier (The interactor with non null uniprot id will always come first). If the uniprotkb identifiers are identical, it will look at the Refseq identifiers (The interactor with non null refseq id will always come first). If the Refseq and uniport identifiers are not set, it will look at the rogids (The interactor with non null rogid will always come first). If the rogids are identical, it will look at the gene names (The interactor with non null gene name will always come first).- Since:
15/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ProteinComparator(PolymerComparator polymerComparator)
Creates a new UnambiguousProteinComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Protein protein1, Protein protein2)
It will first use UnambiguousPolymerComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look for uniprotkb identifier (The interactor with non null uniprot id will always come first).PolymerComparator
getInteractorComparator()
Getter for the fieldinteractorComparator
.-
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
-
ProteinComparator
public ProteinComparator(PolymerComparator polymerComparator)
Creates a new UnambiguousProteinComparator. It will uses a UnambiguousPolymerComparator to compare interactor properties and a OrganismTaxIdComparator to compares organism.- Parameters:
polymerComparator
- aPolymerComparator
object.
-
-
Method Detail
-
compare
public int compare(Protein protein1, Protein protein2)
It will first use UnambiguousPolymerComparator to compare the basic interactor properties If the basic interactor properties are the same, It will look for uniprotkb identifier (The interactor with non null uniprot id will always come first). If the uniprotkb identifiers are identical, it will look at the Refseq identifiers (The interactor with non null refseq id will always come first). If the Refseq and uniport identifiers are not set, it will look at the rogids (The interactor with non null rogid will always come first). If the rogids are identical, it will look at the gene names (The interactor with non null gene name will always come first).- Specified by:
compare
in interfaceComparator<Protein>
- Parameters:
protein1
- aProtein
object.protein2
- aProtein
object.- Returns:
- a int.
-
getInteractorComparator
public PolymerComparator getInteractorComparator()
Getter for the field
interactorComparator
.- Returns:
- a
PolymerComparator
object.
-
-