Class ParticipantEvidenceComparator

  • All Implemented Interfaces:
    Comparator<ParticipantEvidence>
    Direct Known Subclasses:
    UnambiguousExactParticipantEvidenceComparator, UnambiguousParticipantEvidenceComparator

    public class ParticipantEvidenceComparator
    extends Object
    implements Comparator<ParticipantEvidence>
    Basic Experimental participant comparator. It will first compares experimental roles using AbstractCvTermComparator. If both experimental roles are equals, it will look at the identification methods using AbstractCvTermComparator. If both identification methods are equals, it will look at the experimental preparations using AbstractCvTermComparator. If both experimental preparations are equals, it will look at the expressed in organisms using OrganismComparator. If both organisms are the same, it will compare parameters using ParameterComparator
    Since:
    17/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • ParticipantEvidenceComparator

        public ParticipantEvidenceComparator​(ExperimentalParticipantPoolComparator poolComparator)
        Creates a new ParticipantEvidenceComparator
        Parameters:
        poolComparator - : the participant pool comparator required to compare basic properties of a participant and participant candidates in case of a pool
    • Method Detail

      • compare

        public int compare​(ParticipantEvidence experimentalParticipant1,
                           ParticipantEvidence experimentalParticipant2)
        It will first compares experimental roles using AbstractCvTermComparator. If both experimental roles are equals, it will look at the identification methods using AbstractCvTermComparator. If both identification methods are equals, it will look at the experimental preparations using AbstractCvTermComparator. If both experimental preparations are equals, it will look at the expressed in organisms using OrganismComparator. If both organisms are the same, it will compare parameters using ParameterComparator
        Specified by:
        compare in interface Comparator<ParticipantEvidence>
        Parameters:
        experimentalParticipant1 - a ParticipantEvidence object.
        experimentalParticipant2 - a ParticipantEvidence object.
        Returns:
        a int.