Class DatatypeFeatures
java.lang.Object
tools.jackson.databind.cfg.DatatypeFeatures
- All Implemented Interfaces:
Serializable
Immutable value class that contains settings for multiple
DatatypeFeature enumerations.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classHelper class to avoid cyclic dependencies when initializing default instance forDatatypeFeatures. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final intprivate final intprivate final intprivate final intprotected static final intprotected static final intprotected static final intprivate static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDatatypeFeatures(int enabledFor1, int explicitFor1, int enabledFor2, int explicitFor2, int enabledFor3, int explicitFor3) -
Method Summary
Modifier and TypeMethodDescriptionprivate static final int_calcMask(DatatypeFeature... features) private DatatypeFeatures_with(int enabledFor1, int explicitFor1, int enabledFor2, int explicitFor2, int enabledFor3, int explicitFor3) static DatatypeFeaturesAccessor for getting explicit state of given feature in this set iff explicitly set, ornullif not explicitly set (default value)booleanAccessor for getting value of specified feature in this set, regardless of whether explicit defined or not (if not explicitly enabled/disabled returns default value,JacksonFeature.enabledByDefault().booleanConvenience method equivalent to:booleanConvenience method equivalent to:booleanAccessor for checking whether given feature has been explicitly enabled or disabled in this set or not: if not it has the default value.Mutant factory method that returns an instance with given Feature explicitly enabled.withFeatures(DatatypeFeature... features) "Bulk" variant ofwith(DatatypeFeature)which allows explicit enabling of multiple featuresMutant factory method that returns an instance with given Feature explicitly disabled.withoutFeatures(DatatypeFeature... features) "Bulk" variant ofwithout(DatatypeFeature)which allows explicit disabling of multiple features
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
FEATURE_INDEX_ENUM
protected static final int FEATURE_INDEX_ENUM- See Also:
-
FEATURE_INDEX_JSON_NODE
protected static final int FEATURE_INDEX_JSON_NODE- See Also:
-
FEATURE_INDEX_DATETIME
protected static final int FEATURE_INDEX_DATETIME- See Also:
-
_enabledFor1
private final int _enabledFor1 -
_enabledFor2
private final int _enabledFor2 -
_enabledFor3
private final int _enabledFor3 -
_explicitFor1
private final int _explicitFor1 -
_explicitFor2
private final int _explicitFor2 -
_explicitFor3
private final int _explicitFor3
-
-
Constructor Details
-
DatatypeFeatures
protected DatatypeFeatures(int enabledFor1, int explicitFor1, int enabledFor2, int explicitFor2, int enabledFor3, int explicitFor3)
-
-
Method Details
-
defaultFeatures
-
_with
private DatatypeFeatures _with(int enabledFor1, int explicitFor1, int enabledFor2, int explicitFor2, int enabledFor3, int explicitFor3) -
with
Mutant factory method that returns an instance with given Feature explicitly enabled.- Parameters:
f-DatatypeFeatureto explicitly enable in this set- Returns:
- Existing instance if there is no change (feature was already explicitly enabled), or a new instance with feature explicitly enabled (if it was not).
-
withFeatures
"Bulk" variant ofwith(DatatypeFeature)which allows explicit enabling of multiple features- Parameters:
features-DatatypeFeatures to explicitly enable in this set- Returns:
- Existing instance if there is no change (features were already explicitly enabled), or a new instance with features explicitly enabled (if it was not).
-
without
Mutant factory method that returns an instance with given Feature explicitly disabled.- Parameters:
f-DatatypeFeatureto explicitly disable in this set- Returns:
- Existing instance if there is no change (feature was already explicitly disabled), or a new instance with feature explicitly disabled (if it was not).
-
withoutFeatures
"Bulk" variant ofwithout(DatatypeFeature)which allows explicit disabling of multiple features- Parameters:
features-DatatypeFeatures to explicitly disable in this set- Returns:
- Existing instance if there is no change (features were already explicitly disabled), or a new instance with features explicitly disabled (if it was not).
-
_calcMask
-
isEnabled
Accessor for getting value of specified feature in this set, regardless of whether explicit defined or not (if not explicitly enabled/disabled returns default value,JacksonFeature.enabledByDefault().- Parameters:
f- Feature to check- Returns:
- True if the specified Feature is enabled in this set either explicitly or by having enabled by default (if not explicit enabled or disabled).
-
isExplicitlySet
Accessor for checking whether given feature has been explicitly enabled or disabled in this set or not: if not it has the default value.- Parameters:
f- Feature to check- Returns:
- Whether given feature has been explicitly set (enabled or disabled) in this set or not.
-
isExplicitlyEnabled
Convenience method equivalent to:isExplicitlySet(f) && isEnabled(f)
- Parameters:
f- Feature to check- Returns:
- Whether given feature has been explicitly enabled
-
isExplicitlyDisabled
Convenience method equivalent to:isExplicitlySet(f) && isDisabled(f)
- Parameters:
f- Feature to check- Returns:
- Whether given feature has been explicitly disabled
-
getExplicitState
Accessor for getting explicit state of given feature in this set iff explicitly set, ornullif not explicitly set (default value)- Parameters:
f- Feature to check- Returns:
Boolean.TRUEif Feature has been explicitly enabled in this set;Boolean.FALSEif Feature has been explicitly disabled in this set; ornullif Feature still has its default value.
-