Class UnambiguousCuratedExperimentComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.experiment.ExperimentComparator
-
- psidev.psi.mi.jami.utils.comparator.experiment.UnambiguousCuratedExperimentComparator
-
- All Implemented Interfaces:
Comparator<Experiment>
public class UnambiguousCuratedExperimentComparator extends ExperimentComparator
Unambiguous curated experiments comparator It will look first at the publications using a UnambiguousCuratedPublicationComparator. If the publications are the same, it will look at the interaction detection methods using UnambiguousCvTermComparator. If the interaction detection methods are the same, it will look at the host organisms using UnambiguousOrganismComparator. If the host organisms are the same, it will look at the variableParameters using UnambiguousVariableParameterComparator. This comparator will ignore all the other properties of an experiment.- Since:
31/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousCuratedExperimentComparator()
Creates a new UnambiguousCuratedExperimentComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(Experiment experiment1, Experiment experiment2)
Use UnambiguousExperimentComparator to know if two experiment are equals.int
compare(Experiment experiment1, Experiment experiment2)
It will look first at the publications using a AbstractPublicationComparator.UnambiguousCvTermComparator
getCvTermComparator()
Getter for the fieldcvTermComparator
.UnambiguousOrganismComparator
getOrganismComparator()
Getter for the fieldorganismComparator
.UnambiguousCuratedPublicationComparator
getPublicationComparator()
Getter for the fieldpublicationComparator
.static int
hashCode(Experiment exp)
hashCode-
Methods inherited from class psidev.psi.mi.jami.utils.comparator.experiment.ExperimentComparator
getVariableParameterCollectionComparator
-
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
-
UnambiguousCuratedExperimentComparator
public UnambiguousCuratedExperimentComparator()
Creates a new UnambiguousCuratedExperimentComparator. It will use UnambiguousCuratedPublicationComparator to compare publications, UnambiguousCvTermComparator to compare interaction detection methods and it will use UnambiguousOrganismComparator to compare host organisms.
-
-
Method Detail
-
compare
public int compare(Experiment experiment1, Experiment experiment2)
Description copied from class:ExperimentComparator
It will look first at the publications using a AbstractPublicationComparator. If the publications are the same, it will look at the interaction detection methods using AbstractCvTermComparator. If the interaction detection methods are the same, it will look at the host organisms using OrganismComparator. If the host organisms are the same, it will look at the variableParameters using VariableParameterComparator. This comparator will ignore all the other properties of an experiment.- Specified by:
compare
in interfaceComparator<Experiment>
- Overrides:
compare
in classExperimentComparator
- Parameters:
experiment1
- aExperiment
object.experiment2
- aExperiment
object.- Returns:
- a int.
-
getPublicationComparator
public UnambiguousCuratedPublicationComparator getPublicationComparator()
Getter for the field
publicationComparator
.- Overrides:
getPublicationComparator
in classExperimentComparator
- Returns:
- a
Comparator
object.
-
getOrganismComparator
public UnambiguousOrganismComparator getOrganismComparator()
Getter for the field
organismComparator
.- Overrides:
getOrganismComparator
in classExperimentComparator
- Returns:
- a
OrganismComparator
object.
-
getCvTermComparator
public UnambiguousCvTermComparator getCvTermComparator()
Getter for the field
cvTermComparator
.- Overrides:
getCvTermComparator
in classExperimentComparator
- Returns:
- a
Comparator
object.
-
areEquals
public static boolean areEquals(Experiment experiment1, Experiment experiment2)
Use UnambiguousExperimentComparator to know if two experiment are equals.- Parameters:
experiment1
- aExperiment
object.experiment2
- aExperiment
object.- Returns:
- true if the two experiment are equal
-
hashCode
public static int hashCode(Experiment exp)
hashCode
- Parameters:
exp
- aExperiment
object.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-