Class CooperativeEffectBaseComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.cooperativity.CooperativeEffectBaseComparator
-
- All Implemented Interfaces:
Comparator<CooperativeEffect>
- Direct Known Subclasses:
UnambiguousCooperativeEffectBaseComparator
,UnambiguousExactCooperativeEffectBaseComparator
public class CooperativeEffectBaseComparator extends Object implements Comparator<CooperativeEffect>
Basic comparator for CooperativeEffect It will first compare the outcome using AbstractCvTermComparator. Then it will compare the response using AbstractCvTermComparator. Then it will compare the CooperativityEvidences using CooperativityEvidenceComparator. Finally it will compare the affected interactions using ModelledInteractionComparator- Since:
22/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description CooperativeEffectBaseComparator(Comparator<CvTerm> cvTermComparator, CollectionComparator<CooperativityEvidence> cooperativityEvidenceComparator, CollectionComparator<ModelledInteraction> modelledInteractionComparator)
Constructor for CooperativeEffectBaseComparator.CooperativeEffectBaseComparator(Comparator<CvTerm> cvTermComparator, CooperativityEvidenceComparator cooperativityEvidenceComparator, ModelledInteractionComparator modelledInteractionComparator)
Constructor for CooperativeEffectBaseComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(CooperativeEffect cooperativeEffect1, CooperativeEffect cooperativeEffect2)
It will first compare the outcome using AbstractCvTermComparator.CollectionComparator<CooperativityEvidence>
getCooperativityEvidenceCollectionComparator()
Getter for the fieldcooperativityEvidenceCollectionComparator
.Comparator<CvTerm>
getCvTermComparator()
Getter for the fieldcvTermComparator
.CollectionComparator<ModelledInteraction>
getModelledInteractionCollectionComparator()
Getter for the fieldmodelledInteractionCollectionComparator
.-
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
-
CooperativeEffectBaseComparator
public CooperativeEffectBaseComparator(Comparator<CvTerm> cvTermComparator, CooperativityEvidenceComparator cooperativityEvidenceComparator, ModelledInteractionComparator modelledInteractionComparator)
Constructor for CooperativeEffectBaseComparator.
- Parameters:
cvTermComparator
- aComparator
object.cooperativityEvidenceComparator
- aCooperativityEvidenceComparator
object.modelledInteractionComparator
- aModelledInteractionComparator
object.
-
CooperativeEffectBaseComparator
public CooperativeEffectBaseComparator(Comparator<CvTerm> cvTermComparator, CollectionComparator<CooperativityEvidence> cooperativityEvidenceComparator, CollectionComparator<ModelledInteraction> modelledInteractionComparator)
Constructor for CooperativeEffectBaseComparator.
- Parameters:
cvTermComparator
- aComparator
object.cooperativityEvidenceComparator
- aCollectionComparator
object.modelledInteractionComparator
- aCollectionComparator
object.
-
-
Method Detail
-
getCvTermComparator
public Comparator<CvTerm> getCvTermComparator()
Getter for the field
cvTermComparator
.- Returns:
- a
Comparator
object.
-
getCooperativityEvidenceCollectionComparator
public CollectionComparator<CooperativityEvidence> getCooperativityEvidenceCollectionComparator()
Getter for the field
cooperativityEvidenceCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
getModelledInteractionCollectionComparator
public CollectionComparator<ModelledInteraction> getModelledInteractionCollectionComparator()
Getter for the field
modelledInteractionCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
compare
public int compare(CooperativeEffect cooperativeEffect1, CooperativeEffect cooperativeEffect2)
It will first compare the outcome using AbstractCvTermComparator. Then it will compare the response using AbstractCvTermComparator. Then it will compare the CooperativityEvidences using CooperativityEvidenceComparator. Finally it will compare the affected interactions using ModelledInteractionComparator- Specified by:
compare
in interfaceComparator<CooperativeEffect>
- Parameters:
cooperativeEffect1
- aCooperativeEffect
object.cooperativeEffect2
- aCooperativeEffect
object.- Returns:
- a int.
-
-