Enum Class RoundingDirectionEnum
- All Implemented Interfaces:
Serializable
,Comparable<RoundingDirectionEnum>
,Constable
Java class for RoundingDirectionEnum.
The following schema fragment specifies the expected content contained within this class.
<simpleType name="RoundingDirectionEnum"> <restriction base="{http://www.w3.org/2001/XMLSchema}token"> <enumeration value="Up"/> <enumeration value="Down"/> <enumeration value="Nearest"/> </restriction> </simpleType>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA fractional number will be rounded down to the specified number of decimal places (the precision).A fractional number will be rounded either up or down to the specified number of decimal places (the precision) depending on its value.A fractional number will be rounded up to the specified number of decimal places (the precision). -
Method Summary
Modifier and TypeMethodDescriptionstatic RoundingDirectionEnum
value()
static RoundingDirectionEnum
Returns the enum constant of this class with the specified name.static RoundingDirectionEnum[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
value
-
fromValue
-