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 booleanareEquals(Experiment experiment1, Experiment experiment2)Use UnambiguousExperimentComparator to know if two experiment are equals.intcompare(Experiment experiment1, Experiment experiment2)It will look first at the publications using a AbstractPublicationComparator.UnambiguousCvTermComparatorgetCvTermComparator()Getter for the fieldcvTermComparator.UnambiguousOrganismComparatorgetOrganismComparator()Getter for the fieldorganismComparator.UnambiguousCuratedPublicationComparatorgetPublicationComparator()Getter for the fieldpublicationComparator.static inthashCode(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:ExperimentComparatorIt 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:
comparein interfaceComparator<Experiment>- Overrides:
comparein classExperimentComparator- Parameters:
experiment1- aExperimentobject.experiment2- aExperimentobject.- Returns:
- a int.
-
getPublicationComparator
public UnambiguousCuratedPublicationComparator getPublicationComparator()
Getter for the field
publicationComparator.- Overrides:
getPublicationComparatorin classExperimentComparator- Returns:
- a
Comparatorobject.
-
getOrganismComparator
public UnambiguousOrganismComparator getOrganismComparator()
Getter for the field
organismComparator.- Overrides:
getOrganismComparatorin classExperimentComparator- Returns:
- a
OrganismComparatorobject.
-
getCvTermComparator
public UnambiguousCvTermComparator getCvTermComparator()
Getter for the field
cvTermComparator.- Overrides:
getCvTermComparatorin classExperimentComparator- Returns:
- a
Comparatorobject.
-
areEquals
public static boolean areEquals(Experiment experiment1, Experiment experiment2)
Use UnambiguousExperimentComparator to know if two experiment are equals.- Parameters:
experiment1- aExperimentobject.experiment2- aExperimentobject.- Returns:
- true if the two experiment are equal
-
hashCode
public static int hashCode(Experiment exp)
hashCode
- Parameters:
exp- aExperimentobject.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-