Class DefaultConfidenceComparator


  • public class DefaultConfidenceComparator
    extends Object
    Default confidence comparator. It will compares the confidence types first, then the units and finally the value. - Two confidences which are null are equals - The confidence which is not null is before null. - Use DefaultCvTermComparator to compare first the confidence types. - If confidence types are equals, use DefaultCvTermComparator to compare the units. - If the units are not set, compares the values (case sensitive) - If both units are set and If they are equals, compares the values (case sensitive) - The confidence (same type, same value) with unit which is not null will be before the one with a null unit
    Since:
    18/12/12
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • DefaultConfidenceComparator

        public DefaultConfidenceComparator()
    • Method Detail

      • areEquals

        public static boolean areEquals​(Confidence confidence1,
                                        Confidence confidence2)
        Use DefaultConfidenceComparator to know if two confidences are equals.
        Parameters:
        confidence1 - a Confidence object.
        confidence2 - a Confidence object.
        Returns:
        true if the two confidences are equal