Class ExperimentalParticipantPoolComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.ExperimentalParticipantPoolComparator
-
- All Implemented Interfaces:
Comparator<ExperimentalParticipantPool>
- Direct Known Subclasses:
UnambiguousExactExperimentalParticipantPoolComparator,UnambiguousExperimentalParticipantPoolComparator
public class ExperimentalParticipantPoolComparator extends Object implements Comparator<ExperimentalParticipantPool>
Basic Experimental participant pool comparator. It will first compares experimental roles using AbstractCvTermComparator. If both experimental roles are equals, it will look at the identification methods using AbstractCvTermComparator. If both identification methods are equals, it will look at the experimental preparations using AbstractCvTermComparator. If both experimental preparations are equals, it will look at the expressed in organisms using OrganismComparator. If both organisms are the same, it will compare parameters using ParameterComparator All participant candidates will be compared with ExperimentalEntityComparator- Since:
17/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ExperimentalParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, OrganismComparator organismComparator, CollectionComparator<Parameter> parameterComparator, CollectionComparator<FeatureEvidence> featureComparator, CollectionComparator<ExperimentalEntity> entityComparator, CollectionComparator<CvTerm> cvTermComparator)Creates a new ExperimentalParticipantPoolComparatorExperimentalParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, OrganismComparator organismComparator, ParameterComparator parameterComparator, FeatureEvidenceComparator featureComparator, ExperimentalEntityComparator entityComparator)Creates a new ExperimentalParticipantPoolComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ExperimentalParticipantPool experimentalParticipant1, ExperimentalParticipantPool experimentalParticipant2)It will first compares experimental roles using AbstractCvTermComparator.CollectionComparator<CvTerm>getCvTermCollectionComparator()Getter for the fieldcvTermCollectionComparator.Comparator<ExperimentalEntity>getExperimentalEntityComparator()Getter for the fieldexperimentalEntityComparator.CollectionComparator<FeatureEvidence>getFeatureCollectionComparator()Getter for the fieldfeatureCollectionComparator.OrganismComparatorgetOrganismComparator()Getter for the fieldorganismComparator.CollectionComparator<Parameter>getParameterCollectionComparator()Getter for the fieldparameterCollectionComparator.ParticipantBaseComparatorgetParticipantBaseComparator()Getter for the fieldparticipantBaseComparator.-
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
-
ExperimentalParticipantPoolComparator
public ExperimentalParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, OrganismComparator organismComparator, ParameterComparator parameterComparator, FeatureEvidenceComparator featureComparator, ExperimentalEntityComparator entityComparator)
Creates a new ExperimentalParticipantPoolComparator- Parameters:
participantBaseComparator- : the participant comparator required to compare basic properties of a participantorganismComparator- : the organism comparator required to compare expressed in organismsparameterComparator- : ParameterComparator required for comparing participant featuresentityComparator- : comparator for participant candidatesfeatureComparator- aFeatureEvidenceComparatorobject.
-
ExperimentalParticipantPoolComparator
public ExperimentalParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, OrganismComparator organismComparator, CollectionComparator<Parameter> parameterComparator, CollectionComparator<FeatureEvidence> featureComparator, CollectionComparator<ExperimentalEntity> entityComparator, CollectionComparator<CvTerm> cvTermComparator)
Creates a new ExperimentalParticipantPoolComparator- Parameters:
participantBaseComparator- : the participant comparator required to compare basic properties of a participantorganismComparator- : the organism comparator required to compare expressed in organismsparameterComparator- : ParameterComparator required for comparing participant featuresentityComparator- : comparator for participant candidatescvTermComparator- : comparator for collection of cvsfeatureComparator- aCollectionComparatorobject.
-
-
Method Detail
-
getParameterCollectionComparator
public CollectionComparator<Parameter> getParameterCollectionComparator()
Getter for the field
parameterCollectionComparator.- Returns:
- a
CollectionComparatorobject.
-
getParticipantBaseComparator
public ParticipantBaseComparator getParticipantBaseComparator()
Getter for the field
participantBaseComparator.- Returns:
- a
ParticipantBaseComparatorobject.
-
getCvTermCollectionComparator
public CollectionComparator<CvTerm> getCvTermCollectionComparator()
Getter for the field
cvTermCollectionComparator.- Returns:
- a
CollectionComparatorobject.
-
getOrganismComparator
public OrganismComparator getOrganismComparator()
Getter for the field
organismComparator.- Returns:
- a
OrganismComparatorobject.
-
getFeatureCollectionComparator
public CollectionComparator<FeatureEvidence> getFeatureCollectionComparator()
Getter for the field
featureCollectionComparator.- Returns:
- a
CollectionComparatorobject.
-
getExperimentalEntityComparator
public Comparator<ExperimentalEntity> getExperimentalEntityComparator()
Getter for the field
experimentalEntityComparator.- Returns:
- a
Comparatorobject.
-
compare
public int compare(ExperimentalParticipantPool experimentalParticipant1, ExperimentalParticipantPool experimentalParticipant2)
It will first compares experimental roles using AbstractCvTermComparator. If both experimental roles are equals, it will look at the identification methods using AbstractCvTermComparator. If both identification methods are equals, it will look at the experimental preparations using AbstractCvTermComparator. If both experimental preparations are equals, it will look at the expressed in organisms using OrganismComparator. If both organisms are the same, it will compare parameters using ParameterComparator All participant candidates will be compared with ExperimentalEntityComparator- Specified by:
comparein interfaceComparator<ExperimentalParticipantPool>- Parameters:
experimentalParticipant1- aExperimentalParticipantPoolobject.experimentalParticipant2- aExperimentalParticipantPoolobject.- Returns:
- a int.
-
-