- java.lang.Object
-
- java.lang.Enum<JsonConfig.KeyStrategy>
-
- jakarta.json.JsonConfig.KeyStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<JsonConfig.KeyStrategy>
- Enclosing class:
- JsonConfig
public static enum JsonConfig.KeyStrategy extends Enum<JsonConfig.KeyStrategy>
Contains the different values allowed forJsonConfig.KEY_STRATEGY
. SeeJsonConfig.KEY_STRATEGY
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FIRST
Configuration value that will take the value of the first match.LAST
Configuration value that will take the value of the last match.NONE
Configuration value that will throwJsonException
when duplicate key is found.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JsonConfig.KeyStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static JsonConfig.KeyStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FIRST
public static final JsonConfig.KeyStrategy FIRST
Configuration value that will take the value of the first match.
-
LAST
public static final JsonConfig.KeyStrategy LAST
Configuration value that will take the value of the last match.
-
NONE
public static final JsonConfig.KeyStrategy NONE
Configuration value that will throwJsonException
when duplicate key is found.
-
-
Method Detail
-
values
public static JsonConfig.KeyStrategy[] 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 (JsonConfig.KeyStrategy c : JsonConfig.KeyStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JsonConfig.KeyStrategy 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
-
-