Class ParticipantPoolComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.ParticipantPoolComparator
-
- All Implemented Interfaces:
Comparator<ParticipantPool>
- Direct Known Subclasses:
UnambiguousExactParticipantPoolComparator,UnambiguousParticipantPoolComparator
public class ParticipantPoolComparator extends Object implements Comparator<ParticipantPool>
Basic participant pool comparator. It will first compares basic participant properties using ParticipantBaseComparator, then it will compare participant pool type using cv term comparator and then it will compare each participant candidate using EntityBaseComparator- Since:
17/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator)Creates a new ParticipantPoolComparatorParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, CollectionComparator<Entity> entityCollectionComparator)Constructor for ParticipantPoolComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ParticipantPool participant1, ParticipantPool participant2)It will first compares basic participant properties using ParticipantBaseComparator, then it will compare participant pool type using cv term comparator and then it will compare each participant candidate using EntityBaseComparatorParticipantBaseComparatorgetParticipantBaseComparator()Getter for the fieldparticipantBaseComparator.CollectionComparator<Entity>getParticipantCollectionComparator()getParticipantCollectionComparator-
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
-
ParticipantPoolComparator
public ParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator)
Creates a new ParticipantPoolComparator- Parameters:
participantBaseComparator- : the participant comparator required to compare basic properties of a participant
-
ParticipantPoolComparator
public ParticipantPoolComparator(ParticipantBaseComparator participantBaseComparator, CollectionComparator<Entity> entityCollectionComparator)
Constructor for ParticipantPoolComparator.
- Parameters:
participantBaseComparator- aParticipantBaseComparatorobject.entityCollectionComparator- aCollectionComparatorobject.
-
-
Method Detail
-
getParticipantBaseComparator
public ParticipantBaseComparator getParticipantBaseComparator()
Getter for the field
participantBaseComparator.- Returns:
- a
ParticipantBaseComparatorobject.
-
getParticipantCollectionComparator
public CollectionComparator<Entity> getParticipantCollectionComparator()
getParticipantCollectionComparator
- Returns:
- a
CollectionComparatorobject.
-
compare
public int compare(ParticipantPool participant1, ParticipantPool participant2)
It will first compares basic participant properties using ParticipantBaseComparator, then it will compare participant pool type using cv term comparator and then it will compare each participant candidate using EntityBaseComparator- Specified by:
comparein interfaceComparator<ParticipantPool>- Parameters:
participant1- aParticipantPoolobject.participant2- aParticipantPoolobject.- Returns:
- a int.
-
-