Class EntityComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.EntityComparator
-
- All Implemented Interfaces:
Comparator<Entity>
- Direct Known Subclasses:
UnambiguousEntityComparator
,UnambiguousExactEntityComparator
public class EntityComparator extends Object implements Comparator<Entity>
Generic entity comparator. Modelled participants come first and then experimental participants. - It uses ParticipantEvidenceComparator to compare experimental participants - It uses ModelledParticipantComparator to compare biological participants - It uses ParticipantBaseComparator to compare basic participant properties - It uses ParticipantPoolComparator to compare basic participant pool properties- Since:
04/02/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description EntityComparator(EntityBaseComparator participantBaseComparator, ExperimentalEntityComparator experimentalParticipantComparator, ModelledEntityComparator modelledParticipantComparator, ParticipantComparator poolComparator)
Constructor for EntityComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Entity participant1, Entity participant2)
Modelled participants come first and then experimental participants.ModelledEntityComparator
getBiologicalEntityComparator()
Getter for the fieldbiologicalEntityComparator
.EntityBaseComparator
getEntityBaseComparator()
Getter for the fieldentityBaseComparator
.ExperimentalEntityComparator
getExperimentalEntityComparator()
Getter for the fieldexperimentalEntityComparator
.ParticipantComparator
getParticipantComparator()
Getter for the fieldparticipantComparator
.-
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
-
EntityComparator
public EntityComparator(EntityBaseComparator participantBaseComparator, ExperimentalEntityComparator experimentalParticipantComparator, ModelledEntityComparator modelledParticipantComparator, ParticipantComparator poolComparator)
Constructor for EntityComparator.
- Parameters:
participantBaseComparator
- aEntityBaseComparator
object.experimentalParticipantComparator
- aExperimentalEntityComparator
object.modelledParticipantComparator
- aModelledEntityComparator
object.poolComparator
- aParticipantComparator
object.
-
-
Method Detail
-
compare
public int compare(Entity participant1, Entity participant2)
Modelled participants come first and then experimental participants. - It uses ParticipantEvidenceComparator to compare experimental participants - It uses ModelledParticipantComparator to compare biological participants - It uses ParticipantBaseComparator to compare basic participant properties- Specified by:
compare
in interfaceComparator<Entity>
- Parameters:
participant1
- aEntity
object.participant2
- aEntity
object.- Returns:
- a int.
-
getEntityBaseComparator
public EntityBaseComparator getEntityBaseComparator()
Getter for the field
entityBaseComparator
.- Returns:
- a
EntityBaseComparator
object.
-
getExperimentalEntityComparator
public ExperimentalEntityComparator getExperimentalEntityComparator()
Getter for the field
experimentalEntityComparator
.- Returns:
- a
ExperimentalEntityComparator
object.
-
getBiologicalEntityComparator
public ModelledEntityComparator getBiologicalEntityComparator()
Getter for the field
biologicalEntityComparator
.- Returns:
- a
ModelledEntityComparator
object.
-
getParticipantComparator
public ParticipantComparator getParticipantComparator()
Getter for the field
participantComparator
.- Returns:
- a
ParticipantComparator
object.
-
-