Class ModelledInteractionComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interaction.ModelledInteractionComparator
-
- All Implemented Interfaces:
Comparator<ModelledInteraction>
- Direct Known Subclasses:
CuratedModelledInteractionComparator,UnambiguousExactModelledInteractionComparator,UnambiguousModelledInteractionComparator
public class ModelledInteractionComparator extends Object implements Comparator<ModelledInteraction>
Basic ModelledInteraction comparator. It will use aComparatorof typeInteractionto compare basic interaction properties. Then it will compare the modelledParticipants using CustomizableModelledParticipantComparator.- Since:
18/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ModelledInteractionComparator(CollectionComparator<ModelledParticipant> participantComparator, Comparator<Interaction> interactionComparator)Constructor for ModelledInteractionComparator.ModelledInteractionComparator(CustomizableModelledParticipantComparator participantComparator, Comparator<Interaction> interactionComparator)Constructor for ModelledInteractionComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ModelledInteraction modelledInteraction1, ModelledInteraction modelledInteraction2)It will use aComparatorof typeInteractionto compare basic interaction properties.Comparator<Interaction>getInteractionBaseComparator()Getter for the fieldinteractionBaseComparator.CollectionComparator<ModelledParticipant>getParticipantCollectionComparator()Getter for the fieldparticipantCollectionComparator.-
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
-
ModelledInteractionComparator
public ModelledInteractionComparator(CustomizableModelledParticipantComparator participantComparator, Comparator<Interaction> interactionComparator)
Constructor for ModelledInteractionComparator.
- Parameters:
participantComparator- : required to compare participantsinteractionComparator- aComparatorobject.
-
ModelledInteractionComparator
public ModelledInteractionComparator(CollectionComparator<ModelledParticipant> participantComparator, Comparator<Interaction> interactionComparator)
Constructor for ModelledInteractionComparator.
- Parameters:
participantComparator- aCollectionComparatorobject.interactionComparator- aComparatorobject.
-
-
Method Detail
-
getParticipantCollectionComparator
public CollectionComparator<ModelledParticipant> getParticipantCollectionComparator()
Getter for the field
participantCollectionComparator.- Returns:
- a
CollectionComparatorobject.
-
getInteractionBaseComparator
public Comparator<Interaction> getInteractionBaseComparator()
Getter for the field
interactionBaseComparator.- Returns:
- a
Comparatorobject.
-
compare
public int compare(ModelledInteraction modelledInteraction1, ModelledInteraction modelledInteraction2)
It will use aComparatorof typeInteractionto compare basic interaction properties. Then it will compare the modelledParticipants using CustomizableModelledParticipantComparator.- Specified by:
comparein interfaceComparator<ModelledInteraction>- Parameters:
modelledInteraction1- aModelledInteractionobject.modelledInteraction2- aModelledInteractionobject.- Returns:
- a int.
-
-