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 int
compare(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
.OrganismComparator
getOrganismComparator()
Getter for the fieldorganismComparator
.CollectionComparator<Parameter>
getParameterCollectionComparator()
Getter for the fieldparameterCollectionComparator
.ParticipantBaseComparator
getParticipantBaseComparator()
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
- aFeatureEvidenceComparator
object.
-
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
- aCollectionComparator
object.
-
-
Method Detail
-
getParameterCollectionComparator
public CollectionComparator<Parameter> getParameterCollectionComparator()
Getter for the field
parameterCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
getParticipantBaseComparator
public ParticipantBaseComparator getParticipantBaseComparator()
Getter for the field
participantBaseComparator
.- Returns:
- a
ParticipantBaseComparator
object.
-
getCvTermCollectionComparator
public CollectionComparator<CvTerm> getCvTermCollectionComparator()
Getter for the field
cvTermCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
getOrganismComparator
public OrganismComparator getOrganismComparator()
Getter for the field
organismComparator
.- Returns:
- a
OrganismComparator
object.
-
getFeatureCollectionComparator
public CollectionComparator<FeatureEvidence> getFeatureCollectionComparator()
Getter for the field
featureCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
getExperimentalEntityComparator
public Comparator<ExperimentalEntity> getExperimentalEntityComparator()
Getter for the field
experimentalEntityComparator
.- Returns:
- a
Comparator
object.
-
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:
compare
in interfaceComparator<ExperimentalParticipantPool>
- Parameters:
experimentalParticipant1
- aExperimentalParticipantPool
object.experimentalParticipant2
- aExperimentalParticipantPool
object.- Returns:
- a int.
-
-