Class InteractionComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interaction.InteractionComparator
-
- All Implemented Interfaces:
Comparator<Interaction>
- Direct Known Subclasses:
UnambiguousCuratedInteractionComparator
,UnambiguousExactCuratedInteractionComparator
,UnambiguousExactInteractionComparator
,UnambiguousInteractionComparator
public class InteractionComparator extends Object implements Comparator<Interaction>
Generic interaction comparator. Modelled interactions come first, then experimental interactions. - It uses InteractionEvidenceComparator to compare experimental interactions - It uses ModelledInteractionComparator to compare modelled interactions - It uses AbstractInteractionBaseComparator to compare basic interaction properties- Since:
04/02/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description InteractionComparator(Comparator<Interaction> interactionBaseComparator, ModelledInteractionComparator modelledInteractionComparator, InteractionEvidenceComparator experimentalInteractionComparator)
Constructor for InteractionComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Interaction interaction1, Interaction interaction2)
Modelled interactions come first, then experimental interactions.InteractionEvidenceComparator
getExperimentalInteractionComparator()
Getter for the fieldexperimentalInteractionComparator
.Comparator<Interaction>
getInteractionBaseComparator()
Getter for the fieldinteractionBaseComparator
.ModelledInteractionComparator
getModelledInteractionComparator()
Getter for the fieldmodelledInteractionComparator
.-
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
-
InteractionComparator
public InteractionComparator(Comparator<Interaction> interactionBaseComparator, ModelledInteractionComparator modelledInteractionComparator, InteractionEvidenceComparator experimentalInteractionComparator)
Constructor for InteractionComparator.
- Parameters:
interactionBaseComparator
- aComparator
object.modelledInteractionComparator
- aModelledInteractionComparator
object.experimentalInteractionComparator
- aInteractionEvidenceComparator
object.
-
-
Method Detail
-
getInteractionBaseComparator
public Comparator<Interaction> getInteractionBaseComparator()
Getter for the field
interactionBaseComparator
.- Returns:
- a
Comparator
object.
-
getExperimentalInteractionComparator
public InteractionEvidenceComparator getExperimentalInteractionComparator()
Getter for the field
experimentalInteractionComparator
.- Returns:
- a
InteractionEvidenceComparator
object.
-
getModelledInteractionComparator
public ModelledInteractionComparator getModelledInteractionComparator()
Getter for the field
modelledInteractionComparator
.- Returns:
- a
ModelledInteractionComparator
object.
-
compare
public int compare(Interaction interaction1, Interaction interaction2)
Modelled interactions come first, then experimental interactions. - It uses InteractionEvidenceComparator to compare experimental interactions - It uses ModelledInteractionComparator to compare modelled interactions - It uses AbstractInteractionBaseComparator to compare basic interaction properties- Specified by:
compare
in interfaceComparator<Interaction>
- Parameters:
interaction1
- aInteraction
object.interaction2
- aInteraction
object.- Returns:
- a int.
-
-