Class CuratedInteractionBaseComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interaction.CuratedInteractionBaseComparator
-
- All Implemented Interfaces:
Comparator<Interaction>
- Direct Known Subclasses:
UnambiguousCuratedInteractionBaseComparator
public class CuratedInteractionBaseComparator extends Object implements Comparator<Interaction>
Basic comparator for curated interactions. It will first compare the basic properties of an interaction using AbstractInteractionBaseComparator. Then it will compare the created dates (null created dates always come after) Finally it will compare the updated date (null updated date always come after)- Since:
31/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description CuratedInteractionBaseComparator(Comparator<Interaction> interactionBaseComparator)
Constructor for CuratedInteractionBaseComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Interaction interaction1, Interaction interaction2)
It will first compare the basic properties of an interaction using AbstractInteractionBaseComparator.Comparator<Interaction>
getInteractionBaseComparator()
Getter for the fieldinteractionBaseComparator
.-
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
-
CuratedInteractionBaseComparator
public CuratedInteractionBaseComparator(Comparator<Interaction> interactionBaseComparator)
Constructor for CuratedInteractionBaseComparator.
- Parameters:
interactionBaseComparator
- : required to compare basic properties of an interaction
-
-
Method Detail
-
getInteractionBaseComparator
public Comparator<Interaction> getInteractionBaseComparator()
Getter for the field
interactionBaseComparator
.- Returns:
- a
Comparator
object.
-
compare
public int compare(Interaction interaction1, Interaction interaction2)
It will first compare the basic properties of an interaction using AbstractInteractionBaseComparator. Then it will compare the created dates (null created dates always come after) Finally it will compare the updated date (null updated date always come after)- Specified by:
compare
in interfaceComparator<Interaction>
- Parameters:
interaction1
- aInteraction
object.interaction2
- aInteraction
object.- Returns:
- a int.
-
-