Class UnambiguousCuratedInteractionBaseComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interaction.CuratedInteractionBaseComparator
-
- psidev.psi.mi.jami.utils.comparator.interaction.UnambiguousCuratedInteractionBaseComparator
-
- All Implemented Interfaces:
Comparator<Interaction>
public class UnambiguousCuratedInteractionBaseComparator extends CuratedInteractionBaseComparator
Unambiguous comparator for curated interactions.It will first compare the basic properties of an interaction using UnambiguousInteractionBaseComparator. 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 UnambiguousCuratedInteractionBaseComparator()
Constructor for UnambiguousCuratedInteractionBaseComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(Interaction interaction1, Interaction interaction2)
Use UnambiguousCuratedInteractionBaseComparator to know if two interactions are equals.int
compare(Interaction interaction1, Interaction interaction2)
It will first compare the basic properties of an interaction using AbstractInteractionBaseComparator.UnambiguousInteractionBaseComparator
getInteractionBaseComparator()
Getter for the fieldinteractionBaseComparator
.static int
hashCode(Interaction interaction)
hashCode-
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
-
-
-
-
Method Detail
-
areEquals
public static boolean areEquals(Interaction interaction1, Interaction interaction2)
Use UnambiguousCuratedInteractionBaseComparator to know if two interactions are equals.- Parameters:
interaction1
- aInteraction
object.interaction2
- aInteraction
object.- Returns:
- true if the two interactions are equal
-
hashCode
public static int hashCode(Interaction interaction)
hashCode
- Parameters:
interaction
- aInteraction
object.- Returns:
- the hashcode consistent with the equals method for this comparator
-
getInteractionBaseComparator
public UnambiguousInteractionBaseComparator getInteractionBaseComparator()
Getter for the field
interactionBaseComparator
.Getter for the field
interactionBaseComparator
.- Overrides:
getInteractionBaseComparator
in classCuratedInteractionBaseComparator
- 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) It will first compare the basic properties of an interaction using UnambiguousInteractionBaseComparator. 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>
- Overrides:
compare
in classCuratedInteractionBaseComparator
- Parameters:
interaction1
- aInteraction
object.interaction2
- aInteraction
object.- Returns:
- a int.
-
-