Class PolymerComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.PolymerComparator
-
- All Implemented Interfaces:
Comparator<Polymer>
- Direct Known Subclasses:
UnambiguousExactPolymerComparator
,UnambiguousPolymerComparator
public class PolymerComparator extends Object implements Comparator<Polymer>
polymer comparator. It will first use UnambiguousInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, it will look at sequence/organism. *- Since:
21/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description PolymerComparator(Comparator<Interactor> interactorBaseComparator, OrganismTaxIdComparator organismComparator)
Creates a new UnambiguousPolymerComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Polymer polymer1, Polymer polymer2)
It will first use DefaultExactInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, it will look at sequence/organism.Comparator<Interactor>
getInteractorComparator()
Getter for the fieldinteractorComparator
.OrganismTaxIdComparator
getOrganismComparator()
Getter for the fieldorganismComparator
.-
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
-
PolymerComparator
public PolymerComparator(Comparator<Interactor> interactorBaseComparator, OrganismTaxIdComparator organismComparator)
Creates a new UnambiguousPolymerComparator. It will uses a UnambiguousInteractorBaseComparator to compare interactor properties and a OrganismTaxIdComparator to compares organism.- Parameters:
interactorBaseComparator
- aComparator
object.organismComparator
- aOrganismTaxIdComparator
object.
-
-
Method Detail
-
getInteractorComparator
public Comparator<Interactor> getInteractorComparator()
Getter for the field
interactorComparator
.- Returns:
- a
Comparator
object.
-
getOrganismComparator
public OrganismTaxIdComparator getOrganismComparator()
Getter for the field
organismComparator
.- Returns:
- a
OrganismTaxIdComparator
object.
-
compare
public int compare(Polymer polymer1, Polymer polymer2)
It will first use DefaultExactInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, it will look at sequence/organism.- Specified by:
compare
in interfaceComparator<Polymer>
- Parameters:
polymer1
- aPolymer
object.polymer2
- aPolymer
object.- Returns:
- a int.
-
-