Class DefaultCvTermComparator


  • public class DefaultCvTermComparator
    extends Object
    Default comparator for CvTerms. If one CvTerm does not have any identifiers (MOD or MI, then the all identifiers), it will only compare the short names (case insensitive). If both CvTerm objects have identifiers, it will look for at least one identical identifier using DefaultExternalIdentifierComparator and ignores all the other properties. - Two CvTerms which are null are equals - If the two external identifiers are set, use DefaultExternalIdentifierComparator - When one of the CvTerms (or both CvTerms) do not have an external identifier, it compares the short names (case insensitive) which cannot be null
    Since:
    18/12/12
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • DefaultCvTermComparator

        public DefaultCvTermComparator()
    • Method Detail

      • areEquals

        public static boolean areEquals​(CvTerm cvTerm1,
                                        CvTerm cvTerm2)
        Use DefaultCvTermComparator to know if two CvTerms are equals.
        Parameters:
        cvTerm1 - a CvTerm object.
        cvTerm2 - a CvTerm object.
        Returns:
        true if the two CvTerms are equal