Class ParameterValueComparator

  • All Implemented Interfaces:
    Comparator<ParameterValue>

    public class ParameterValueComparator
    extends Object
    implements Comparator<ParameterValue>
    Comparator for ParameterValue. It compares the BigDecimal value of factor.multiply(BigDecimal.valueOf(base^exponent)) If both values are null, they are equals. The value that is not null comes before the one that is null.
    Since:
    19/12/12
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • ParameterValueComparator

        public ParameterValueComparator()
    • Method Detail

      • areEquals

        public static boolean areEquals​(ParameterValue value1,
                                        ParameterValue value2)
        Use ParameterValueComparator to know if two ParameterValue are equals.
        Parameters:
        value1 - a ParameterValue object.
        value2 - a ParameterValue object.
        Returns:
        true if the two parameter values are equal
      • hashCode

        public static int hashCode​(ParameterValue param)

        hashCode

        Parameters:
        param - a ParameterValue object.
        Returns:
        the hashcode consistent with the equals method for this comparator