Class DefaultAnnotationComparator


  • public class DefaultAnnotationComparator
    extends Object
    Default annotation comparator It compares first the topics and then the value (case insensitive) - Two annotations which are null are equals - The annotation which is not null is before null. - use DefaultCvTermComparator to compare the topics. If they are equals, compares the values (case insensitive) - If both annotations have same topic, the one with a null value is always after the one with a non null value.
    Since:
    18/12/12
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • DefaultAnnotationComparator

        public DefaultAnnotationComparator()
    • Method Detail

      • areEquals

        public static boolean areEquals​(Annotation annotation1,
                                        Annotation annotation2)
        Use DefaultAnnotationComparator to know if two annotations are equals.
        Parameters:
        annotation1 - a Annotation object.
        annotation2 - a Annotation object.
        Returns:
        true if the two annotations are equal