Class UnambiguousInteractionEvidenceComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interaction.InteractionEvidenceComparator
-
- psidev.psi.mi.jami.utils.comparator.interaction.UnambiguousInteractionEvidenceComparator
-
- All Implemented Interfaces:
Comparator<InteractionEvidence>
public class UnambiguousInteractionEvidenceComparator extends InteractionEvidenceComparator
Unambiguous InteractionEvidenceComparator. It will first compare the basic interaction properties using UnambiguousInteractionBaseComparator. 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 UnambiguousExperimentComparator. 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:
21/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousInteractionEvidenceComparator()
Creates a new UnambiguousInteractionEvidenceComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(InteractionEvidence interaction1, InteractionEvidence interaction2)
Use UnambiguousInteractionEvidenceComparator to know if two experimental interactions are equals.int
compare(InteractionEvidence interaction1, InteractionEvidence interaction2)
It will first compare the basic interaction properties using UnambiguousInteractionBaseComparator.UnambiguousExperimentComparator
getExperimentComparator()
Getter for the fieldexperimentComparator
.UnambiguousInteractionBaseComparator
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
-
UnambiguousInteractionEvidenceComparator
public UnambiguousInteractionEvidenceComparator()
Creates a new UnambiguousInteractionEvidenceComparator. It will use a UnambiguousInteractionBaseComparator to compare basic interaction properties, UnambiguousParameterComparator to compare parameters, UnambiguousExperimentComparator to compare experiments
-
-
Method Detail
-
getExperimentComparator
public UnambiguousExperimentComparator getExperimentComparator()
Getter for the field
experimentComparator
.- Overrides:
getExperimentComparator
in classInteractionEvidenceComparator
- Returns:
- a
ExperimentComparator
object.
-
getInteractionBaseComparator
public UnambiguousInteractionBaseComparator 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 UnambiguousInteractionBaseComparator. 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 UnambiguousExperimentComparator. 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 UnambiguousInteractionEvidenceComparator to know if two experimental interactions are equals.- Parameters:
interaction1
- aInteractionEvidence
object.interaction2
- aInteractionEvidence
object.- Returns:
- true if the two experimental interactions are equal
-
-