Class InteractionInteractorComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interaction.InteractionInteractorComparator
-
- All Implemented Interfaces:
Comparator<Interaction>
- Direct Known Subclasses:
UnambiguousExactInteractionInteractorComparator
,UnambiguousInteractionInteractorComparator
public class InteractionInteractorComparator extends Object implements Comparator<Interaction>
Simple interaction comparator only based on the interactors of an interaction. It will use a InteractorComparator to compare the interactors involved in the interaction. It will ignore all other properties of an Interaction- Since:
18/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description InteractionInteractorComparator(CollectionComparator<Participant> interactorComparator)
Constructor for InteractionInteractorComparator.InteractionInteractorComparator(InteractorComparator interactorComparator)
Creates a new InteractionInteractorComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Interaction interaction1, Interaction interaction2)
It will use a ParticipantInteractorComparator comparator for comparing the participants involved in the interaction.CollectionComparator<Participant>
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
-
InteractionInteractorComparator
public InteractionInteractorComparator(InteractorComparator interactorComparator)
Creates a new InteractionInteractorComparator- Parameters:
interactorComparator
- : interactor comparator required for comparing interactors involved in the interaction
-
InteractionInteractorComparator
public InteractionInteractorComparator(CollectionComparator<Participant> interactorComparator)
Constructor for InteractionInteractorComparator.
- Parameters:
interactorComparator
- aCollectionComparator
object.
-
-
Method Detail
-
getParticipantCollectionComparator
public CollectionComparator<Participant> getParticipantCollectionComparator()
Getter for the field
participantCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
compare
public int compare(Interaction interaction1, Interaction interaction2)
It will use a ParticipantInteractorComparator comparator for comparing the participants involved in the interaction. It will ignore all other properties of an Interaction- Specified by:
compare
in interfaceComparator<Interaction>
- Parameters:
interaction1
- aInteraction
object.interaction2
- aInteraction
object.- Returns:
- a int.
-
-