Class 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 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 interface Comparator<Interaction>
        Parameters:
        interaction1 - a Interaction object.
        interaction2 - a Interaction object.
        Returns:
        a int.