Package com.fasterxml.jackson.core
Enum JsonParser.NumberTypeFP
- java.lang.Object
-
- java.lang.Enum<JsonParser.NumberTypeFP>
-
- com.fasterxml.jackson.core.JsonParser.NumberTypeFP
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JsonParser.NumberTypeFP>
- Enclosing class:
- JsonParser
public static enum JsonParser.NumberTypeFP extends java.lang.Enum<JsonParser.NumberTypeFP>
Enumeration of possible physical Floating-Point types that underlying format uses. Used to indicate most accurate (and efficient) representation if known (if not known,UNKNOWN
is used).- Since:
- 2.17
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BIG_DECIMAL
Unlimited precision, decimal (10-based) valuesDOUBLE64
Standard IEEE-754 double-precision 64-bit binary valueFLOAT16
Special "mini-float" that some binary formats support.FLOAT32
Standard IEEE-754 single-precision 32-bit binary valueUNKNOWN
Constant used when type is not known, or there is no specific type to match: most commonly used for textual formats like JSON where representation does not necessarily have single easily detectable optimal representation (for example, value0.1
has no exact binary representation whereas0.25
has exact representation in every binary type supported)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JsonParser.NumberTypeFP
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JsonParser.NumberTypeFP[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FLOAT16
public static final JsonParser.NumberTypeFP FLOAT16
Special "mini-float" that some binary formats support.
-
FLOAT32
public static final JsonParser.NumberTypeFP FLOAT32
Standard IEEE-754 single-precision 32-bit binary value
-
DOUBLE64
public static final JsonParser.NumberTypeFP DOUBLE64
Standard IEEE-754 double-precision 64-bit binary value
-
BIG_DECIMAL
public static final JsonParser.NumberTypeFP BIG_DECIMAL
Unlimited precision, decimal (10-based) values
-
UNKNOWN
public static final JsonParser.NumberTypeFP UNKNOWN
Constant used when type is not known, or there is no specific type to match: most commonly used for textual formats like JSON where representation does not necessarily have single easily detectable optimal representation (for example, value0.1
has no exact binary representation whereas0.25
has exact representation in every binary type supported)
-
-
Method Detail
-
values
public static JsonParser.NumberTypeFP[] 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 (JsonParser.NumberTypeFP c : JsonParser.NumberTypeFP.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JsonParser.NumberTypeFP valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-