Class NucleicAcidComparator

  • All Implemented Interfaces:
    Comparator<NucleicAcid>
    Direct Known Subclasses:
    UnambiguousExactNucleicAcidComparator, UnambiguousNucleicAcidComparator

    public class NucleicAcidComparator
    extends Object
    implements Comparator<NucleicAcid>
    Unambiguous nucleic acids comparator. It will first use UnambiguousPolymerComparator to compare the basic interactor properties. If the basic polymer properties are the same, It will look for DDBJ/EMBL/Genbank identifier. If the DDBJ/EMBL/Genbank identifiers are identical, it will look at the Refseq identifiers.
    Since:
    15/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • NucleicAcidComparator

        public NucleicAcidComparator​(PolymerComparator polymerComparator)
        Creates a new UnambiguousNucleicAcidComparator. It will uses a UnambiguousInteractorBaseComparator to compare interactor properties and a OrganismTaxIdComparator to compares organism.
        Parameters:
        polymerComparator - a PolymerComparator object.
    • Method Detail

      • compare

        public int compare​(NucleicAcid nucleicAcid1,
                           NucleicAcid nucleicAcid2)
        It will first use UnambiguousPolymerComparator to compare the basic interactor properties. If the basic polymer properties are the same, It will look for DDBJ/EMBL/Genbank identifier. If the DDBJ/EMBL/Genbank identifiers are identical, it will look at the Refseq identifiers.
        Specified by:
        compare in interface Comparator<NucleicAcid>
        Parameters:
        nucleicAcid1 - a NucleicAcid object.
        nucleicAcid2 - a NucleicAcid object.
        Returns:
        a int.