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 aComparator
of typeInteraction
to 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 int
compare(ModelledInteraction modelledInteraction1, ModelledInteraction modelledInteraction2)
It will use aComparator
of typeInteraction
to 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
- aComparator
object.
-
ModelledInteractionComparator
public ModelledInteractionComparator(CollectionComparator<ModelledParticipant> participantComparator, Comparator<Interaction> interactionComparator)
Constructor for ModelledInteractionComparator.
- Parameters:
participantComparator
- aCollectionComparator
object.interactionComparator
- aComparator
object.
-
-
Method Detail
-
getParticipantCollectionComparator
public CollectionComparator<ModelledParticipant> getParticipantCollectionComparator()
Getter for the field
participantCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
getInteractionBaseComparator
public Comparator<Interaction> getInteractionBaseComparator()
Getter for the field
interactionBaseComparator
.- Returns:
- a
Comparator
object.
-
compare
public int compare(ModelledInteraction modelledInteraction1, ModelledInteraction modelledInteraction2)
It will use aComparator
of typeInteraction
to compare basic interaction properties. Then it will compare the modelledParticipants using CustomizableModelledParticipantComparator.- Specified by:
compare
in interfaceComparator<ModelledInteraction>
- Parameters:
modelledInteraction1
- aModelledInteraction
object.modelledInteraction2
- aModelledInteraction
object.- Returns:
- a int.
-
-