Class DefaultXrefComparator


  • public class DefaultXrefComparator
    extends Object
    Default Xref comparator It compares first the databases and then the ids (case sensitive) but ignores the version. To compare the databases, it looks first at the identifiers id if they exist, otherwise it looks at the database shortlabel only. Then it will compare the qualifier. To compare the qualifiers, it looks first at the identifiers id if they exist, otherwise it looks at the qualifier shortlabel only. It will ignore the version - Two xrefs which are null are equals - The xref which is not null is before null. - If both xref databases and ids are the same, compare the qualifiers.
    Since:
    19/12/12
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • DefaultXrefComparator

        public DefaultXrefComparator()
    • Method Detail

      • areEquals

        public static boolean areEquals​(Xref xref1,
                                        Xref xref2)
        Use DefaultXrefComparator to know if two xrefs are equals.
        Parameters:
        xref1 - a Xref object.
        xref2 - a Xref object.
        Returns:
        true if the two xrefs are equal