Enum NumericComparison

    • Enum Constant Detail

      • GT

        public static final NumericComparison GT
        Is beingCompared greater than comparedAgainst
      • GTE

        public static final NumericComparison GTE
        Is beingCompared greater than or equal to comparedAgainst
      • LT

        public static final NumericComparison LT
        Is beingCompared less than comparedAgainst
      • LTE

        public static final NumericComparison LTE
        Is beingCompared less than or equal to comparedAgainst
      • EQ

        public static final NumericComparison EQ
        Is beingCompared equal to comparedAgainst
      • NE

        public static final NumericComparison NE
        Is beingCompared not equal to comparedAgainst
    • Method Detail

      • values

        public static NumericComparison[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (NumericComparison c : NumericComparison.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NumericComparison valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • asString

        public String asString()
      • compare

        public abstract boolean compare​(double beingCompared,
                                        double comparedAgainst)
        Compares two given numeric values
        Parameters:
        beingCompared - The number being compared
        comparedAgainst - The number being compared against
        Returns:
        true if the inequality holds