Package org.kiwiproject.json
Enum JsonHelper.MergeOption
- java.lang.Object
-
- java.lang.Enum<JsonHelper.MergeOption>
-
- org.kiwiproject.json.JsonHelper.MergeOption
-
- All Implemented Interfaces:
Serializable,Comparable<JsonHelper.MergeOption>
- Enclosing class:
- JsonHelper
public static enum JsonHelper.MergeOption extends Enum<JsonHelper.MergeOption>
Describes how objects are to be merged.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IGNORE_NULLSThis option will ignore null values in an update object.MERGE_ARRAYSThis option will cause arrays to be merged rather than replaced.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JsonHelper.MergeOptionvalueOf(String name)Returns the enum constant of this type with the specified name.static JsonHelper.MergeOption[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MERGE_ARRAYS
public static final JsonHelper.MergeOption MERGE_ARRAYS
This option will cause arrays to be merged rather than replaced. The default is that arrays will be replaced with a new value. Specify this option to merge them instead.
-
IGNORE_NULLS
public static final JsonHelper.MergeOption IGNORE_NULLS
This option will ignore null values in an update object. The default is to respect null values and set the updated value to null. Specify this option to ignore nulls instead.
-
-
Method Detail
-
values
public static JsonHelper.MergeOption[] 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 (JsonHelper.MergeOption c : JsonHelper.MergeOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JsonHelper.MergeOption 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
-
-