Class ModelledParticipantPoolComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.ModelledParticipantPoolComparator
-
- All Implemented Interfaces:
Comparator<ModelledParticipantPool>
- Direct Known Subclasses:
UnambiguousExactModelledParticipantPoolComparator,UnambiguousModelledParticipantPoolComparator
public class ModelledParticipantPoolComparator extends Object implements Comparator<ModelledParticipantPool>
Basic biological participant pool comparator. It will compare the basic properties of a biological participant pool using ParticipantBaseComparator. Then features will be compared with ModelledFeatureComparator. All the participant candidates will be compared using ModelledEntityComparator This comparator will ignore all the other properties of a biological participant.- Since:
13/02/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ModelledParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, CollectionComparator<ModelledFeature> featureComparator, CollectionComparator<ModelledEntity> entityComparator)Creates a new ComponentComparatorModelledParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, ModelledFeatureComparator featureComparator, ModelledEntityComparator entityComparator)Creates a new ComponentComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ModelledParticipantPool bioParticipant1, ModelledParticipantPool bioParticipant2)It will compare the basic properties of a biological participant pool using ParticipantBaseComparator.CollectionComparator<ModelledFeature>getFeatureCollectionComparator()Getter for the fieldfeatureCollectionComparator.Comparator<ModelledEntity>getModelledEntityComparator()Getter for the fieldmodelledEntityComparator.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
-
ModelledParticipantPoolComparator
public ModelledParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, ModelledFeatureComparator featureComparator, ModelledEntityComparator entityComparator)
Creates a new ComponentComparator- Parameters:
participantBaseComparator- aParticipantBaseComparatorobject.featureComparator- aModelledFeatureComparatorobject.entityComparator- aModelledEntityComparatorobject.
-
ModelledParticipantPoolComparator
public ModelledParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, CollectionComparator<ModelledFeature> featureComparator, CollectionComparator<ModelledEntity> entityComparator)
Creates a new ComponentComparator- Parameters:
participantBaseComparator- aParticipantBaseComparatorobject.featureComparator- aCollectionComparatorobject.entityComparator- aCollectionComparatorobject.
-
-
Method Detail
-
getModelledEntityComparator
public Comparator<ModelledEntity> getModelledEntityComparator()
Getter for the field
modelledEntityComparator.- Returns:
- a
Comparatorobject.
-
getParticipantBaseComparator
public ParticipantBaseComparator getParticipantBaseComparator()
Getter for the field
participantBaseComparator.- Returns:
- a
ParticipantBaseComparatorobject.
-
getFeatureCollectionComparator
public CollectionComparator<ModelledFeature> getFeatureCollectionComparator()
Getter for the field
featureCollectionComparator.- Returns:
- a
CollectionComparatorobject.
-
compare
public int compare(ModelledParticipantPool bioParticipant1, ModelledParticipantPool bioParticipant2)
It will compare the basic properties of a biological participant pool using ParticipantBaseComparator. Then features will be compared with ModelledFeatureComparator. All the participant candidates will be compared using ModelledEntityComparator This comparator will ignore all the other properties of a biological participant.- Specified by:
comparein interfaceComparator<ModelledParticipantPool>- Parameters:
bioParticipant1- aModelledParticipantPoolobject.bioParticipant2- aModelledParticipantPoolobject.- Returns:
- a int.
-
-