Class UnambiguousInteractorComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.InteractorComparator
-
- psidev.psi.mi.jami.utils.comparator.interactor.UnambiguousInteractorComparator
-
- All Implemented Interfaces:
Comparator<Interactor>
public class UnambiguousInteractorComparator extends InteractorComparator
Unambiguous generic Interactor Comparator. Bioactive entities come first, then proteins, then genes, then nucleic acids, then complexes and finally InteractorPool. If two interactors are from the same Interactor interface, it will use a more specific Comparator : - Uses UnambiguousBioactiveEntityComparator for comparing BioactiveEntity objects. - Uses UnambiguousProteinComparator for comparing Protein objects. - Uses UnambiguousGeneComparator for comparing Gene objects. - Uses UnambiguousNucleicAcidComparator for comparing NucleicAcids objects. - Uses UnambiguousPolymerComparator for comparing Polymer objects - Uses UnambiguousComplexComparator for comparing complexes - Uses UnambiguousInteractorPoolComparator for comparing interactor candidates - use UnambiguousInteractorBaseComparator for comparing basic interactors that are not one of the above..- Since:
17/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousInteractorComparator()
Creates a new UnambiguousInteractorComparator.UnambiguousInteractorComparator(UnambiguousComplexComparator complexComparator)
Constructor for UnambiguousInteractorComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(Interactor interactor1, Interactor interactor2)
Use UnambiguousInteractorComparator to know if two interactors are equals.int
compare(Interactor interactor1, Interactor interactor2)
Bioactive entities come first, then proteins, then genes, then nucleic acids, then complexes and finally InteractorPool.UnambiguousBioactiveEntityComparator
getBioactiveEntityComparator()
Getter for the fieldbioactiveEntityComparator
.UnambiguousComplexComparator
getComplexComparator()
Getter for the fieldcomplexComparator
.UnambiguousGeneComparator
getGeneComparator()
Getter for the fieldgeneComparator
.UnambiguousInteractorBaseComparator
getInteractorBaseComparator()
Getter for the fieldinteractorBaseComparator
.UnambiguousNucleicAcidComparator
getNucleicAcidComparator()
Getter for the fieldnucleicAcidComparator
.UnambiguousPolymerComparator
getPolymerComparator()
Getter for the fieldpolymerComparator
.UnambiguousProteinComparator
getProteinComparator()
Getter for the fieldproteinComparator
.-
Methods inherited from class psidev.psi.mi.jami.utils.comparator.interactor.InteractorComparator
getInteractorCandidatesComparator
-
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
-
UnambiguousInteractorComparator
public UnambiguousInteractorComparator()
Creates a new UnambiguousInteractorComparator. - Uses UnambiguousBioactiveEntityComparator for comparing BioactiveEntity objects. - Uses UnambiguousProteinComparator for comparing Protein objects. - Uses UnambiguousGeneComparator for comparing Gene objects. - Uses UnambiguousNucleicAcidComparator for comparing NucleicAcids objects. - Uses UnambiguousInteractorPoolComparator for comparing interactor candidates - use UnambiguousInteractorBaseComparator for comparing basic interactors that are not one of the above..
-
UnambiguousInteractorComparator
public UnambiguousInteractorComparator(UnambiguousComplexComparator complexComparator)
Constructor for UnambiguousInteractorComparator.
- Parameters:
complexComparator
- aUnambiguousComplexComparator
object.
-
-
Method Detail
-
getInteractorBaseComparator
public UnambiguousInteractorBaseComparator getInteractorBaseComparator()
Getter for the field
interactorBaseComparator
.- Overrides:
getInteractorBaseComparator
in classInteractorComparator
- Returns:
- a
Comparator
object.
-
getComplexComparator
public UnambiguousComplexComparator getComplexComparator()
Getter for the field
complexComparator
.- Overrides:
getComplexComparator
in classInteractorComparator
- Returns:
- a
Comparator
object.
-
getPolymerComparator
public UnambiguousPolymerComparator getPolymerComparator()
Getter for the field
polymerComparator
.- Overrides:
getPolymerComparator
in classInteractorComparator
- Returns:
- a
Comparator
object.
-
getBioactiveEntityComparator
public UnambiguousBioactiveEntityComparator getBioactiveEntityComparator()
Getter for the field
bioactiveEntityComparator
.- Overrides:
getBioactiveEntityComparator
in classInteractorComparator
- Returns:
- a
Comparator
object.
-
getGeneComparator
public UnambiguousGeneComparator getGeneComparator()
Getter for the field
geneComparator
.- Overrides:
getGeneComparator
in classInteractorComparator
- Returns:
- a
Comparator
object.
-
getNucleicAcidComparator
public UnambiguousNucleicAcidComparator getNucleicAcidComparator()
Getter for the field
nucleicAcidComparator
.- Overrides:
getNucleicAcidComparator
in classInteractorComparator
- Returns:
- a
Comparator
object.
-
getProteinComparator
public UnambiguousProteinComparator getProteinComparator()
Getter for the field
proteinComparator
.- Overrides:
getProteinComparator
in classInteractorComparator
- Returns:
- a
Comparator
object.
-
compare
public int compare(Interactor interactor1, Interactor interactor2)
Bioactive entities come first, then proteins, then genes, then nucleic acids, then complexes and finally InteractorPool. If two interactors are from the same Interactor interface, it will use a more specific Comparator : - Uses AbstractBioactiveEntityComparator for comparing BioactiveEntity objects. - Uses AbstractProteinComparator for comparing Protein objects. - Uses AbstractGeneComparator for comparing Gene objects. - Uses AbstractNucleicAcidComparator for comparing NucleicAcids objects. - Uses InteractorPoolComparator for comparing interactor candidates - Uses polymerComparator for comparing Polymer objects. - use AbstractInteractorBaseComparator for comparing basic interactors that are not one of the above. Bioactive entities come first, then proteins, then genes, then nucleic acids, then complexes and finally InteractorPool. If two interactors are from the same Interactor interface, it will use a more specific Comparator : - Uses UnambiguousBioactiveEntityComparator for comparing BioactiveEntity objects. - Uses UnambiguousProteinComparator for comparing Protein objects. - Uses UnambiguousGeneComparator for comparing Gene objects. - Uses UnambiguousNucleicAcidComparator for comparing NucleicAcids objects. - Uses UnambiguousInteractorPoolComparator for comparing interactor candidates - use UnambiguousInteractorBaseComparator for comparing basic interactors that are not one of the above..- Specified by:
compare
in interfaceComparator<Interactor>
- Overrides:
compare
in classInteractorComparator
- Parameters:
interactor1
- aInteractor
object.interactor2
- aInteractor
object.- Returns:
- a int.
-
areEquals
public static boolean areEquals(Interactor interactor1, Interactor interactor2)
Use UnambiguousInteractorComparator to know if two interactors are equals.- Parameters:
interactor1
- aInteractor
object.interactor2
- aInteractor
object.- Returns:
- true if the two interactors are equal
-
-