@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:35.931Z") @Stability(value=Stable) public enum SizeRoundingBehavior extends Enum<SizeRoundingBehavior>
Example:
// Example automatically generated from non-compiling source. May contain errors. Size.mebibytes(2).toKibibytes(); // yields 2048 Size.kibibytes(2050).toMebibytes(SizeConversionOptions.builder().rounding(SizeRoundingBehavior.FLOOR).build());
| Enum Constant and Description |
|---|
FAIL
Fail the conversion if the result is not an integer.
|
FLOOR
If the result is not an integer, round it to the closest integer less than the result.
|
NONE
Don't round.
|
| Modifier and Type | Method and Description |
|---|---|
static SizeRoundingBehavior |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SizeRoundingBehavior[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final SizeRoundingBehavior FAIL
@Stability(value=Stable) public static final SizeRoundingBehavior FLOOR
@Stability(value=Stable) public static final SizeRoundingBehavior NONE
Return even if the result is a fraction.
public static SizeRoundingBehavior[] values()
for (SizeRoundingBehavior c : SizeRoundingBehavior.values()) System.out.println(c);
public static SizeRoundingBehavior valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.