Package cdm.base.math

Enum RoundingDirectionEnum

java.lang.Object
java.lang.Enum<RoundingDirectionEnum>
cdm.base.math.RoundingDirectionEnum
All Implemented Interfaces:
Serializable, Comparable<RoundingDirectionEnum>

@RosettaEnum("RoundingDirectionEnum") public enum RoundingDirectionEnum extends Enum<RoundingDirectionEnum>
The enumerated values to specify the rounding direction and precision to be used in the rounding of a number. Used by function cdm.base.math.RoundToPrecision.
Version:
5.30.0
  • Enum Constant Details

    • UP

      @RosettaEnumValue("Up") public static final RoundingDirectionEnum UP
      A fractional number will be rounded up to the specified number of decimal places (the precision). For example, 5.21 and 5.25 rounded up to 1 decimal place are 5.3 and 5.3 respectively.
    • DOWN

      @RosettaEnumValue("Down") public static final RoundingDirectionEnum DOWN
      A fractional number will be rounded down to the specified number of decimal places (the precision). For example, 5.29 and 5.25 rounded down to 1 decimal place are 5.2 and 5.2 respectively.
    • NEAREST

      @RosettaEnumValue("Nearest") public static final RoundingDirectionEnum NEAREST
      A fractional number will be rounded either up or down to the specified number of decimal places (the precision) depending on its value. For example, 5.24 would be rounded down to 5.2 and 5.25 would be rounded up to 5.3 if a precision of 1 decimal place were specified.
  • Method Details

    • values

      public static RoundingDirectionEnum[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static RoundingDirectionEnum 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
    • fromDisplayName

      public static RoundingDirectionEnum fromDisplayName(String name)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<RoundingDirectionEnum>
    • toDisplayString

      public String toDisplayString()