- java.lang.Object
-
- java.lang.Enum<MathType>
-
- io.github.bucket4j.MathType
-
- All Implemented Interfaces:
Serializable,Comparable<MathType>
public enum MathType extends Enum<MathType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IEEE_754Experimental math precision that uses IEEE-754 arithmetic.INTEGER_64_BITSThe default math precision that uses integer arithmetic with 64 bits numbers.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MathTypevalueOf(String name)Returns the enum constant of this type with the specified name.static MathType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INTEGER_64_BITS
public static final MathType INTEGER_64_BITS
The default math precision that uses integer arithmetic with 64 bits numbers.
-
IEEE_754
public static final MathType IEEE_754
Experimental math precision that uses IEEE-754 arithmetic.Warning: you should not use this precision in production, because intention of this precision is the testing purpose for backends written in Lua or JS, in other words for testing backends that do not provide 64-bit integer arithmetic.
-
-
Method Detail
-
values
public static MathType[] 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 (MathType c : MathType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MathType 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
-
-