Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.cfg

public Class DatatypeFeatures

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
com.fasterxml.jackson.core.util.JacksonFeature, .VersionUtil

Immutable value class that contains settings for multiple DatatypeFeature enumerations.
Since
2.14

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
DatatypeFeatures.DefaultHolder

Helper class to avoid cyclic dependencies when initializing default instance for DatatypeFeatures.

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int
private final int
protected static final int
protected static final int
private static final long

Constructor Summary

AccessConstructor and Description
protected
DatatypeFeatures(int enabledFor1, int explicitFor1, int enabledFor2, int explicitFor2)

Method Summary

Modifier and TypeMethod and Description
private static final int
private DatatypeFeatures
_with(int enabledFor1, int explicitFor1, int enabledFor2, int explicitFor2)

public static DatatypeFeatures
public Boolean

Returns:

Boolean.TRUE if Feature has been explicitly enabled in this set; Boolean.FALSE if Feature has been explicitly disabled in this set; or null if Feature still has its default value.
getExplicitState
(DatatypeFeature
Feature to check
f
)

Accessor for getting explicit state of given feature in this set iff explicitly set, or null if not explicitly set (default value)

public boolean

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).
isEnabled
(DatatypeFeature
Feature to check
f
)

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, DatatypeFeature#enabledByDefault().

public boolean

Returns:

Whether given feature has been explicitly disabled
isExplicitlyDisabled
(DatatypeFeature
Feature to check
f
)

Convenience method equivalent to:

   isExplicitlySet(f) && isDisabled(f)
public boolean

Returns:

Whether given feature has been explicitly enabled
isExplicitlyEnabled
(DatatypeFeature
Feature to check
f
)

Convenience method equivalent to:

   isExplicitlySet(f) && isEnabled(f)
public boolean

Returns:

Whether given feature has been explicitly set (enabled or disabled) in this set or not.
isExplicitlySet
(DatatypeFeature
Feature to check
f
)

Accessor for checking whether given feature has been explicitly enabled or disabled in this set or not: if not it has the default value.

public DatatypeFeatures

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).
with
(DatatypeFeature
DatatypeFeature to explicitly enable in this set
f
)

Mutant factory method that returns an instance with given Feature explicitly enabled.

public DatatypeFeatures

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).
withFeatures
(DatatypeFeature...
DatatypeFeatures to explicitly enable in this set
features
)

"Bulk" variant of with(DatatypeFeature) which allows explicit enabling of multiple features

public DatatypeFeatures

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).
without
(DatatypeFeature
DatatypeFeature to explicitly disable in this set
f
)

Mutant factory method that returns an instance with given Feature explicitly disabled.

public DatatypeFeatures

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).
withoutFeatures
(DatatypeFeature...
DatatypeFeatures to explicitly disable in this set
features
)

"Bulk" variant of without(DatatypeFeature) which allows explicit disabling of multiple features

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_enabledFor1back to summary
private final int _enabledFor1
_enabledFor2back to summary
private final int _enabledFor2
_explicitFor1back to summary
private final int _explicitFor1
_explicitFor2back to summary
private final int _explicitFor2
FEATURE_INDEX_ENUMback to summary
protected static final int FEATURE_INDEX_ENUM
FEATURE_INDEX_JSON_NODEback to summary
protected static final int FEATURE_INDEX_JSON_NODE
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

DatatypeFeaturesback to summary
protected DatatypeFeatures(int enabledFor1, int explicitFor1, int enabledFor2, int explicitFor2)

Method Detail

_calcMaskback to summary
private static final int _calcMask(DatatypeFeature... features)
_withback to summary
private DatatypeFeatures _with(int enabledFor1, int explicitFor1, int enabledFor2, int explicitFor2)
defaultFeaturesback to summary
public static DatatypeFeatures defaultFeatures()
getExplicitStateback to summary
public Boolean getExplicitState(DatatypeFeature f)

Accessor for getting explicit state of given feature in this set iff explicitly set, or null if not explicitly set (default value)

Parameters
f:DatatypeFeature

Feature to check

Returns:Boolean

Boolean.TRUE if Feature has been explicitly enabled in this set; Boolean.FALSE if Feature has been explicitly disabled in this set; or null if Feature still has its default value.

isEnabledback to summary
public boolean isEnabled(DatatypeFeature f)

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, DatatypeFeature#enabledByDefault().

Parameters
f:DatatypeFeature

Feature to check

Returns:boolean

True if the specified Feature is enabled in this set either explicitly or by having enabled by default (if not explicit enabled or disabled).

isExplicitlyDisabledback to summary
public boolean isExplicitlyDisabled(DatatypeFeature f)

Convenience method equivalent to:

   isExplicitlySet(f) && isDisabled(f)
Parameters
f:DatatypeFeature

Feature to check

Returns:boolean

Whether given feature has been explicitly disabled

Since
2.15
isExplicitlyEnabledback to summary
public boolean isExplicitlyEnabled(DatatypeFeature f)

Convenience method equivalent to:

   isExplicitlySet(f) && isEnabled(f)
Parameters
f:DatatypeFeature

Feature to check

Returns:boolean

Whether given feature has been explicitly enabled

Since
2.15
isExplicitlySetback to summary
public boolean isExplicitlySet(DatatypeFeature f)

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:DatatypeFeature

Feature to check

Returns:boolean

Whether given feature has been explicitly set (enabled or disabled) in this set or not.

withback to summary
public DatatypeFeatures with(DatatypeFeature f)

Mutant factory method that returns an instance with given Feature explicitly enabled.

Parameters
f:DatatypeFeature

DatatypeFeature to explicitly enable in this set

Returns:DatatypeFeatures

Existing instance if there is no change (feature was already explicitly enabled), or a new instance with feature explicitly enabled (if it was not).

withFeaturesback to summary
public DatatypeFeatures withFeatures(DatatypeFeature... features)

"Bulk" variant of with(DatatypeFeature) which allows explicit enabling of multiple features

Parameters
features:DatatypeFeature[]

DatatypeFeatures to explicitly enable in this set

Returns:DatatypeFeatures

Existing instance if there is no change (features were already explicitly enabled), or a new instance with features explicitly enabled (if it was not).

withoutback to summary
public DatatypeFeatures without(DatatypeFeature f)

Mutant factory method that returns an instance with given Feature explicitly disabled.

Parameters
f:DatatypeFeature

DatatypeFeature to explicitly disable in this set

Returns:DatatypeFeatures

Existing instance if there is no change (feature was already explicitly disabled), or a new instance with feature explicitly disabled (if it was not).

withoutFeaturesback to summary
public DatatypeFeatures withoutFeatures(DatatypeFeature... features)

"Bulk" variant of without(DatatypeFeature) which allows explicit disabling of multiple features

Parameters
features:DatatypeFeature[]

DatatypeFeatures to explicitly disable in this set

Returns:DatatypeFeatures

Existing instance if there is no change (features were already explicitly disabled), or a new instance with features explicitly disabled (if it was not).

com.fasterxml.jackson.databind.cfg back to summary

private Class DatatypeFeatures.DefaultHolder

extends Object
Class Inheritance
  • java.lang.Object
  • com.fasterxml.jackson.databind.cfg.DatatypeFeatures.DefaultHolder

Helper class to avoid cyclic dependencies when initializing default instance for DatatypeFeatures.

Field Summary

Modifier and TypeField and Description
private static final DatatypeFeatures

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static <F extends Enum<F> & JacksonFeature> int
collectDefaults(F[] features)

public static DatatypeFeatures
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_FEATURESback to summary
private static final DatatypeFeatures DEFAULT_FEATURES

Constructor Detail

DefaultHolderback to summary
private DefaultHolder()

Method Detail

collectDefaultsback to summary
private static <F extends Enum<F> & JacksonFeature> int collectDefaults(F[] features)
getDefaultback to summary
public static DatatypeFeatures getDefault()