Class ParticipantInteractorComparator<T extends Entity>
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.ParticipantInteractorComparator<T>
-
- All Implemented Interfaces:
Comparator<T>
- Direct Known Subclasses:
UnambiguousExactModelledParticipantInteractorComparator
,UnambiguousExactParticipantEvidenceInteractorComparator
,UnambiguousExactParticipantInteractorComparator
,UnambiguousModelledParticipantInteractorComparator
,UnambiguousParticipantEvidenceInteractorComparator
,UnambiguousParticipantInteractorComparator
public class ParticipantInteractorComparator<T extends Entity> extends Object implements Comparator<T>
Participant comparator only based on the interactor. It will compare the interactors using InteractorComparator. This comparator will ignore all the other properties of a participant.- Since:
16/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ParticipantInteractorComparator(InteractorComparator interactorComparator)
Creates a new ParticipantInteractorComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(T participant1, T participant2)
It will compare the interactors using InteractorComparator.InteractorComparator
getInteractorComparator()
Getter for the fieldinteractorComparator
.void
setInteractorComparator(InteractorComparator interactorComparator)
Setter for the fieldinteractorComparator
.-
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
-
ParticipantInteractorComparator
public ParticipantInteractorComparator(InteractorComparator interactorComparator)
Creates a new ParticipantInteractorComparator.- Parameters:
interactorComparator
- : the interactor comparator required to compare the interactor
-
-
Method Detail
-
setInteractorComparator
public void setInteractorComparator(InteractorComparator interactorComparator)
Setter for the field
interactorComparator
.- Parameters:
interactorComparator
- aInteractorComparator
object.
-
getInteractorComparator
public InteractorComparator getInteractorComparator()
Getter for the field
interactorComparator
.- Returns:
- a
InteractorComparator
object.
-
compare
public int compare(T participant1, T participant2)
It will compare the interactors using InteractorComparator. This comparator will ignore all the other properties of a participant.- Specified by:
compare
in interfaceComparator<T extends Entity>
- Parameters:
participant1
- a T object.participant2
- a T object.- Returns:
- a int.
-
-