java.util.EnumSet meant for storing sets of
JacksonFeatures (usually java.lang.Enum s): main
difference being that these sets are immutable. Also only supports relatively
small sets of features: specifically, up to 31 features.
| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | JacksonFeatureSet(int
Bitmask for features that are enabled bitmask)Constructor for creating instance with specific bitmask, wherein
|
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public static <F extends JacksonFeature> JacksonFeatureSet | |
| public static < Self-reference type for convenience F extends JacksonFeature> JacksonFeatureSet | Returns: Feature set instance constructedSet of all features (enabled or disabled): usually from
allFeatures)Enum.values()"Default" factory which will calculate settings based on default-enabled status of all features. |
| public boolean | Returns: True if feature is enabled in this set; false otherwiseFeature to check feature)Main accessor for checking whether given feature is enabled in this feature set. |
| public JacksonFeatureSet | Returns: Newly created set of state of feature changed;this if notFeature to enable in set returned feature)Mutant factory for getting a set in which specified feature is enabled: will either return this instance (if no change), or newly created set (if there is change). |
| public JacksonFeatureSet | Returns: Newly created set of state of feature changed;this if notFeature to disable in set returned feature)Mutant factory for getting a set in which specified feature is disabled: will either return this instance (if no change), or newly created set (if there is change). |
| _enabled | back to summary |
|---|---|
| protected int _enabled | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| JacksonFeatureSet | back to summary |
|---|---|
| protected JacksonFeatureSet(int bitmask) Constructor for creating instance with specific bitmask, wherein
| |
| asBitmask | back to summary |
|---|---|
| public int asBitmask() Accessor for underlying bitmask
| |
| fromBitmask | back to summary |
|---|---|
| public static <F extends JacksonFeature> JacksonFeatureSet | |
| fromDefaults | back to summary |
|---|---|
| public static <F extends JacksonFeature> JacksonFeatureSet "Default" factory which will calculate settings based on default-enabled status of all features.
| |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(F feature) Main accessor for checking whether given feature is enabled in this feature set.
| |
| with | back to summary |
|---|---|
| public JacksonFeatureSet Mutant factory for getting a set in which specified feature is enabled: will either return this instance (if no change), or newly created set (if there is change).
| |
| without | back to summary |
|---|---|
| public JacksonFeatureSet Mutant factory for getting a set in which specified feature is disabled: will either return this instance (if no change), or newly created set (if there is change).
| |