Class UnambiguousCuratedInteractionEvidenceComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interaction.InteractionEvidenceComparator
-
- psidev.psi.mi.jami.utils.comparator.interaction.UnambiguousCuratedInteractionEvidenceComparator
-
- All Implemented Interfaces:
Comparator<InteractionEvidence>
public class UnambiguousCuratedInteractionEvidenceComparator extends InteractionEvidenceComparator
Unambiguous curated InteractionEvidenceComparator. It will first compare the basic interaction properties using UnambiguousCuratedInteractionBaseComparator. It will then compares the IMEx identifiers if both IMEx ids are set. If at least one IMEx id is not set, it will compare the negative properties. A negative interaction will come after a positive interaction. it will compare the experiment using UnambiguousCuratedExperimentComparator. If the experiments are the same, it will compare the participants using UnambiguousParticipantEvidenceComparator. Then it will compare the parameters using UnambiguousParameterComparator. If the parameters are the same, it will first compare the experimental variableParameters using VariableParameterValueSetComparator and then it will compare the inferred boolean value (Inferred interactions will always come after).- Since:
31/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousCuratedInteractionEvidenceComparator()
Creates a new UnambiguousCuratedInteractionEvidenceComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(InteractionEvidence interaction1, InteractionEvidence interaction2)
Use UnambiguousCuratedInteractionEvidenceComparator to know if two experimental interactions are equals.int
compare(InteractionEvidence interaction1, InteractionEvidence interaction2)
It will first compare the basic interaction properties using UnambiguousCuratedInteractionBaseComparator.UnambiguousCuratedExperimentComparator
getExperimentComparator()
Getter for the fieldexperimentComparator
.UnambiguousCuratedInteractionBaseComparator
getInteractionBaseComparator()
getInteractionBaseComparator-
Methods inherited from class psidev.psi.mi.jami.utils.comparator.interaction.InteractionEvidenceComparator
getParameterCollectionComparator, getParticipantCollectionComparator, getVariableParameterValueSetCollectionComparator
-
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
-
UnambiguousCuratedInteractionEvidenceComparator
public UnambiguousCuratedInteractionEvidenceComparator()
Creates a new UnambiguousCuratedInteractionEvidenceComparator. It will use a UnambiguousCuratedInteractionBaseComparator to compare basic interaction properties, UnambiguousParameterComparator to compare parameters, UnambiguousCuratedExperimentComparator to compare experiments
-
-
Method Detail
-
getExperimentComparator
public UnambiguousCuratedExperimentComparator getExperimentComparator()
Getter for the field
experimentComparator
.- Overrides:
getExperimentComparator
in classInteractionEvidenceComparator
- Returns:
- a
ExperimentComparator
object.
-
getInteractionBaseComparator
public UnambiguousCuratedInteractionBaseComparator getInteractionBaseComparator()
Description copied from class:InteractionEvidenceComparator
getInteractionBaseComparator
- Overrides:
getInteractionBaseComparator
in classInteractionEvidenceComparator
- Returns:
- a
Comparator
object.
-
compare
public int compare(InteractionEvidence interaction1, InteractionEvidence interaction2)
It will first compare the basic interaction properties using UnambiguousCuratedInteractionBaseComparator. It will then compares the IMEx identifiers if both IMEx ids are set. If at least one IMEx id is not set, it will compare the negative properties. A negative interaction will come after a positive interaction. it will compare the experiment using UnambiguousCuratedExperimentComparator. If the experiments are the same, it will compare the participants using UnambiguousParticipantEvidenceComparator. Then it will compare the parameters using UnambiguousParameterComparator. If the parameters are the same, it will first compare the experimental variableParameters using VariableParameterValueSetComparator and then it will compare the inferred boolean value (Inferred interactions will always come after).- Specified by:
compare
in interfaceComparator<InteractionEvidence>
- Overrides:
compare
in classInteractionEvidenceComparator
- Parameters:
interaction1
- aInteractionEvidence
object.interaction2
- aInteractionEvidence
object.- Returns:
- a int.
-
areEquals
public static boolean areEquals(InteractionEvidence interaction1, InteractionEvidence interaction2)
Use UnambiguousCuratedInteractionEvidenceComparator to know if two experimental interactions are equals.- Parameters:
interaction1
- aInteractionEvidence
object.interaction2
- aInteractionEvidence
object.- Returns:
- true if the two experimental interactions are equal
-
-