Class UnambiguousInteractorComparator

  • All Implemented Interfaces:
    Comparator<Interactor>

    public class UnambiguousInteractorComparator
    extends InteractorComparator
    Unambiguous generic Interactor Comparator. Bioactive entities come first, then proteins, then genes, then nucleic acids, then complexes and finally InteractorPool. If two interactors are from the same Interactor interface, it will use a more specific Comparator : - Uses UnambiguousBioactiveEntityComparator for comparing BioactiveEntity objects. - Uses UnambiguousProteinComparator for comparing Protein objects. - Uses UnambiguousGeneComparator for comparing Gene objects. - Uses UnambiguousNucleicAcidComparator for comparing NucleicAcids objects. - Uses UnambiguousPolymerComparator for comparing Polymer objects - Uses UnambiguousComplexComparator for comparing complexes - Uses UnambiguousInteractorPoolComparator for comparing interactor candidates - use UnambiguousInteractorBaseComparator for comparing basic interactors that are not one of the above..
    Since:
    17/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • UnambiguousInteractorComparator

        public UnambiguousInteractorComparator()
        Creates a new UnambiguousInteractorComparator. - Uses UnambiguousBioactiveEntityComparator for comparing BioactiveEntity objects. - Uses UnambiguousProteinComparator for comparing Protein objects. - Uses UnambiguousGeneComparator for comparing Gene objects. - Uses UnambiguousNucleicAcidComparator for comparing NucleicAcids objects. - Uses UnambiguousInteractorPoolComparator for comparing interactor candidates - use UnambiguousInteractorBaseComparator for comparing basic interactors that are not one of the above..
    • Method Detail

      • compare

        public int compare​(Interactor interactor1,
                           Interactor interactor2)
        Bioactive entities come first, then proteins, then genes, then nucleic acids, then complexes and finally InteractorPool. If two interactors are from the same Interactor interface, it will use a more specific Comparator : - Uses AbstractBioactiveEntityComparator for comparing BioactiveEntity objects. - Uses AbstractProteinComparator for comparing Protein objects. - Uses AbstractGeneComparator for comparing Gene objects. - Uses AbstractNucleicAcidComparator for comparing NucleicAcids objects. - Uses InteractorPoolComparator for comparing interactor candidates - Uses polymerComparator for comparing Polymer objects. - use AbstractInteractorBaseComparator for comparing basic interactors that are not one of the above. Bioactive entities come first, then proteins, then genes, then nucleic acids, then complexes and finally InteractorPool. If two interactors are from the same Interactor interface, it will use a more specific Comparator : - Uses UnambiguousBioactiveEntityComparator for comparing BioactiveEntity objects. - Uses UnambiguousProteinComparator for comparing Protein objects. - Uses UnambiguousGeneComparator for comparing Gene objects. - Uses UnambiguousNucleicAcidComparator for comparing NucleicAcids objects. - Uses UnambiguousInteractorPoolComparator for comparing interactor candidates - use UnambiguousInteractorBaseComparator for comparing basic interactors that are not one of the above..
        Specified by:
        compare in interface Comparator<Interactor>
        Overrides:
        compare in class InteractorComparator
        Parameters:
        interactor1 - a Interactor object.
        interactor2 - a Interactor object.
        Returns:
        a int.
      • areEquals

        public static boolean areEquals​(Interactor interactor1,
                                        Interactor interactor2)
        Use UnambiguousInteractorComparator to know if two interactors are equals.
        Parameters:
        interactor1 - a Interactor object.
        interactor2 - a Interactor object.
        Returns:
        true if the two interactors are equal