Class PolymerComparator

    • Constructor Detail

      • PolymerComparator

        public PolymerComparator​(Comparator<Interactor> interactorBaseComparator,
                                 OrganismTaxIdComparator organismComparator)
        Creates a new UnambiguousPolymerComparator. It will uses a UnambiguousInteractorBaseComparator to compare interactor properties and a OrganismTaxIdComparator to compares organism.
        Parameters:
        interactorBaseComparator - a Comparator object.
        organismComparator - a OrganismTaxIdComparator object.
    • Method Detail

      • getInteractorComparator

        public Comparator<Interactor> getInteractorComparator()

        Getter for the field interactorComparator.

        Returns:
        a Comparator object.
      • compare

        public int compare​(Polymer polymer1,
                           Polymer polymer2)
        It will first use DefaultExactInteractorBaseComparator to compare the basic interactor properties If the basic interactor properties are the same, it will look at sequence/organism.
        Specified by:
        compare in interface Comparator<Polymer>
        Parameters:
        polymer1 - a Polymer object.
        polymer2 - a Polymer object.
        Returns:
        a int.