Class InteractorComparator

  • All Implemented Interfaces:
    Comparator<Interactor>
    Direct Known Subclasses:
    UnambiguousExactInteractorComparator, UnambiguousInteractorComparator

    public class InteractorComparator
    extends Object
    implements Comparator<Interactor>
    Generic Interactor Comparator. Bioactive entities come first, then proteins, then genes, then nucleic acids, then interactorSet and finally Complexes. 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 ComplexComparator for comparing complexes - Uses AbstractPolymerComparator for comparing polymers - use AbstractInteractorBaseComparator for comparing basic interactors that are not one of the above.
    Since:
    16/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Method Detail

      • getBioactiveEntityComparator

        public Comparator<BioactiveEntity> getBioactiveEntityComparator()

        Getter for the field bioactiveEntityComparator.

        Returns:
        a Comparator object.
      • getGeneComparator

        public Comparator<Gene> getGeneComparator()

        Getter for the field geneComparator.

        Returns:
        a Comparator object.
      • getProteinComparator

        public Comparator<Protein> getProteinComparator()

        Getter for the field proteinComparator.

        Returns:
        a Comparator object.
      • getNucleicAcidComparator

        public Comparator<NucleicAcid> getNucleicAcidComparator()

        Getter for the field nucleicAcidComparator.

        Returns:
        a Comparator object.
      • getInteractorBaseComparator

        public Comparator<Interactor> getInteractorBaseComparator()

        Getter for the field interactorBaseComparator.

        Returns:
        a Comparator object.
      • getComplexComparator

        public Comparator<Complex> getComplexComparator()

        Getter for the field complexComparator.

        Returns:
        a Comparator object.
      • getPolymerComparator

        public Comparator<Polymer> getPolymerComparator()

        Getter for the field polymerComparator.

        Returns:
        a Comparator object.
      • getInteractorCandidatesComparator

        public Comparator<InteractorPool> getInteractorCandidatesComparator()

        Getter for the field interactorCandidatesComparator.

        Returns:
        a Comparator object.
      • 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.
        Specified by:
        compare in interface Comparator<Interactor>
        Parameters:
        interactor1 - a Interactor object.
        interactor2 - a Interactor object.
        Returns:
        a int.