Class UnambiguousParticipantEvidenceComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.ParticipantEvidenceComparator
-
- psidev.psi.mi.jami.utils.comparator.participant.UnambiguousParticipantEvidenceComparator
-
- All Implemented Interfaces:
Comparator<ParticipantEvidence>
public class UnambiguousParticipantEvidenceComparator extends ParticipantEvidenceComparator
Unambiguous Experimental participant comparator. It will first compares experimental roles using UnambiguousCvTermComparator. If both experimental roles are equals, it will look at the identification methods using UnambiguousCvTermComparator. If both identification methods are equals, it will look at the experimental preparations using UnambiguousCvTermComparator. If both experimental preparations are equals, it will look at the expressed in organisms using UnambiguousOrganismComparator.- Since:
17/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousParticipantEvidenceComparator()
Creates a new UnambiguousParticipantEvidenceComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(ParticipantEvidence experimentalParticipant1, ParticipantEvidence component2)
Use UnambiguousParticipantEvidenceComparator to know if two experimental participants are equals.int
compare(ParticipantEvidence experimentalParticipant1, ParticipantEvidence experimentalParticipant2)
It will first compares experimental roles using AbstractCvTermComparator.UnambiguousExperimentalParticipantPoolComparator
getParticipantPoolComparator()
getParticipantPoolComparator-
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
-
UnambiguousParticipantEvidenceComparator
public UnambiguousParticipantEvidenceComparator()
Creates a new UnambiguousParticipantEvidenceComparator. It will use a UnambiguousParticipantBaseComparator to compare the basic properties of a participant, a UnambiguousCvTermComparator to compare experimental roles, preparations and identification methods and a UnambiguousOrganismComparator to compare expressed in organisms
-
-
Method Detail
-
getParticipantPoolComparator
public UnambiguousExperimentalParticipantPoolComparator getParticipantPoolComparator()
Description copied from class:ParticipantEvidenceComparator
getParticipantPoolComparator
- Overrides:
getParticipantPoolComparator
in classParticipantEvidenceComparator
- Returns:
- a
ExperimentalParticipantPoolComparator
object.
-
compare
public int compare(ParticipantEvidence experimentalParticipant1, ParticipantEvidence experimentalParticipant2)
Description copied from class:ParticipantEvidenceComparator
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 interfaceComparator<ParticipantEvidence>
- Overrides:
compare
in classParticipantEvidenceComparator
- Parameters:
experimentalParticipant1
- aParticipantEvidence
object.experimentalParticipant2
- aParticipantEvidence
object.- Returns:
- a int.
-
areEquals
public static boolean areEquals(ParticipantEvidence experimentalParticipant1, ParticipantEvidence component2)
Use UnambiguousParticipantEvidenceComparator to know if two experimental participants are equals.- Parameters:
experimentalParticipant1
- aParticipantEvidence
object.component2
- aParticipantEvidence
object.- Returns:
- true if the two experimental participants are equal
-
-