Enum Digest.Feature
- java.lang.Object
-
- java.lang.Enum<Digest.Feature>
-
- com.authlete.common.util.digest.Digest.Feature
-
- All Implemented Interfaces:
Serializable
,Comparable<Digest.Feature>
- Enclosing class:
- Digest
public static enum Digest.Feature extends Enum<Digest.Feature>
Features to control behaviors.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_ARRAY
Ignore JSON key-value entries whose value is an empty array.IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_OBJECT
Ignore JSON key-value entries whose value is an empty object.IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_STRING
Ignore JSON key-value entries whose value is an empty string.IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_FALSE
Ignore JSON key-value entries whose value isfalse
.IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_NULL
Ignore JSON key-value entries whose value isnull
.IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_ZERO
Ignore JSON key-value entries whose value is zero.SORT_JSON_OBJECT_ENTRY_KEYS
Sort keys of JSON key-value entries before updating.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Digest.Feature
valueOf(String name)
Returns the enum constant of this type with the specified name.static Digest.Feature[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_NULL
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_NULL
Ignore JSON key-value entries whose value isnull
. In other words, JSON key-value entries whose value isnull
are treated as if they did not exist.If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":null } { "key1":"value1" }
The default value is 'disabled'.
-
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_FALSE
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_FALSE
Ignore JSON key-value entries whose value isfalse
. In other words, JSON key-value entries whose value isfalse
are treated as if they did not exist.If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":false } { "key1":"value1" }
The default value is 'disabled'.
-
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_ZERO
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_ZERO
Ignore JSON key-value entries whose value is zero. In other words, JSON key-value entries whose value is zero are treated as if they did not exist.If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":0, "key3":0.0 } { "key1":"value1" }
The default value is 'disabled'.
-
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_STRING
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_STRING
Ignore JSON key-value entries whose value is an empty string. In other words, JSON key-value entries whose value is an empty string are treated as if they did not exist.If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":"" } { "key1":"value1" }
The default value is 'disabled'.
-
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_ARRAY
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_ARRAY
Ignore JSON key-value entries whose value is an empty array. In other words, JSON key-value entries whose value is an empty array are treated as if they did not exist.If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":[] } { "key1":"value1" }
The default value is 'disabled'.
-
IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_OBJECT
public static final Digest.Feature IGNORE_JSON_OBJECT_ENTRY_WITH_VALUE_EMPTY_OBJECT
Ignore JSON key-value entries whose value is an empty object. In other words, JSON key-value entries whose value is an empty object are treated as if they did not exist.If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":{} } { "key1":"value1" }
The default value is 'disabled'.
-
SORT_JSON_OBJECT_ENTRY_KEYS
public static final Digest.Feature SORT_JSON_OBJECT_ENTRY_KEYS
Sort keys of JSON key-value entries before updating.If this feature is enabled, two JSONs below generate the same digest value.
{ "key1":"value1", "key2":"value2" } { "key2":"value2", "key1":"value1" }
The default value is 'enabled'.
-
-
Method Detail
-
values
public static Digest.Feature[] 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 (Digest.Feature c : Digest.Feature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Digest.Feature 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
-
-