Class ModelledParticipantComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.ModelledParticipantComparator
-
- All Implemented Interfaces:
Comparator<ModelledParticipant>,CustomizableModelledParticipantComparator<ModelledParticipant>
- Direct Known Subclasses:
UnambiguousExactModelledParticipantComparator,UnambiguousModelledParticipantComparator
public class ModelledParticipantComparator extends Object implements CustomizableModelledParticipantComparator<ModelledParticipant>
Basic biological participant comparator. It will compare the basic properties of a biological participant using ParticipantBaseComparator. If the participants are both ModelledParticipantPool, it will use ModelledParticipantPoolComparator to compare them 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 ModelledParticipantComparator()Constructor for ModelledParticipantComparator.ModelledParticipantComparator(ModelledParticipantPoolComparator poolComparator)Creates a new ComponentComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearProcessedComplexes()clearProcessedComplexesintcompare(ModelledParticipant bioParticipant1, ModelledParticipant bioParticipant2)It will compare the basic properties of a biological participant using ParticipantBaseComparator.ModelledParticipantPoolComparatorgetParticipantPoolComparator()getParticipantPoolComparatorbooleanisCheckComplexesAsInteractors()isCheckComplexesAsInteractorsvoidsetCheckComplexesAsInteractors(boolean checkComplexesAsInteractors)setCheckComplexesAsInteractorsvoidsetPoolComparator(ModelledParticipantPoolComparator poolComparator)Setter for the fieldpoolComparator.-
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
-
ModelledParticipantComparator
public ModelledParticipantComparator(ModelledParticipantPoolComparator poolComparator)
Creates a new ComponentComparator- Parameters:
poolComparator- aModelledParticipantPoolComparatorobject.
-
ModelledParticipantComparator
public ModelledParticipantComparator()
Constructor for ModelledParticipantComparator.
-
-
Method Detail
-
getParticipantPoolComparator
public ModelledParticipantPoolComparator getParticipantPoolComparator()
getParticipantPoolComparator
- Returns:
- a
ModelledParticipantPoolComparatorobject.
-
setPoolComparator
public void setPoolComparator(ModelledParticipantPoolComparator poolComparator)
Setter for the field
poolComparator.- Parameters:
poolComparator- aModelledParticipantPoolComparatorobject.
-
isCheckComplexesAsInteractors
public boolean isCheckComplexesAsInteractors()
isCheckComplexesAsInteractors
- Specified by:
isCheckComplexesAsInteractorsin interfaceCustomizableModelledParticipantComparator<ModelledParticipant>- Returns:
- a boolean.
-
setCheckComplexesAsInteractors
public void setCheckComplexesAsInteractors(boolean checkComplexesAsInteractors)
setCheckComplexesAsInteractors
- Specified by:
setCheckComplexesAsInteractorsin interfaceCustomizableModelledParticipantComparator<ModelledParticipant>- Parameters:
checkComplexesAsInteractors- a boolean.
-
clearProcessedComplexes
public void clearProcessedComplexes()
clearProcessedComplexes
- Specified by:
clearProcessedComplexesin interfaceCustomizableModelledParticipantComparator<ModelledParticipant>
-
compare
public int compare(ModelledParticipant bioParticipant1, ModelledParticipant bioParticipant2)
It will compare the basic properties of a biological participant using ParticipantBaseComparator. If the participants are both ModelledParticipantPool, it will use ModelledParticipantPoolComparator to compare them This comparator will ignore all the other properties of a biological participant.- Specified by:
comparein interfaceComparator<ModelledParticipant>- Parameters:
bioParticipant1- aModelledParticipantobject.bioParticipant2- aModelledParticipantobject.- Returns:
- a int.
-
-