Package com.pervasivecode.utils.time
Enum DurationRemainderHandling
- java.lang.Object
-
- java.lang.Enum<DurationRemainderHandling>
-
- com.pervasivecode.utils.time.DurationRemainderHandling
-
- All Implemented Interfaces:
Serializable
,Comparable<DurationRemainderHandling>
public enum DurationRemainderHandling extends Enum<DurationRemainderHandling>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ROUND_HALF_EVEN
Round the remainder value to the nearest whole number using the rules described forRoundingMode.HALF_EVEN
.TRUNCATE
Drop the remainder value.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DurationRemainderHandling
valueOf(String name)
Returns the enum constant of this type with the specified name.static DurationRemainderHandling[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TRUNCATE
public static final DurationRemainderHandling TRUNCATE
Drop the remainder value. This is equivalent toRoundingMode.DOWN
.
-
ROUND_HALF_EVEN
public static final DurationRemainderHandling ROUND_HALF_EVEN
Round the remainder value to the nearest whole number using the rules described forRoundingMode.HALF_EVEN
.
-
-
Method Detail
-
values
public static DurationRemainderHandling[] 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 (DurationRemainderHandling c : DurationRemainderHandling.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DurationRemainderHandling 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 nameNullPointerException
- if the argument is null
-
-