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 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 EntityBaseComparatorParticipantBaseComparator
getParticipantBaseComparator()
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
- aParticipantBaseComparator
object.entityCollectionComparator
- aCollectionComparator
object.
-
-
Method Detail
-
getParticipantBaseComparator
public ParticipantBaseComparator getParticipantBaseComparator()
Getter for the field
participantBaseComparator
.- Returns:
- a
ParticipantBaseComparator
object.
-
getParticipantCollectionComparator
public CollectionComparator<Entity> getParticipantCollectionComparator()
getParticipantCollectionComparator
- Returns:
- a
CollectionComparator
object.
-
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:
compare
in interfaceComparator<ParticipantPool>
- Parameters:
participant1
- aParticipantPool
object.participant2
- aParticipantPool
object.- Returns:
- a int.
-
-