Top Description Fields Constructors Methods
com.fasterxml.jackson.annotation

public final Enum OptBoolean

extends Enum<OptBoolean>
Class Inheritance

Optional Boolean value ("nullean"). Needed just because Java annotations can not take 'null' as a value (even as default), so there is no way to distinguish between explicit `true` and `false`, and lack of choice (related: annotations are limited to primitives, so java.lang.Boolean not allowed as solution).

Note

although the use of `true` and `false` would be more convenient, they can not be chosen since they are Java keyword and compiler won't allow the choice. And since enum naming convention suggests all-upper-case, that is what is done here.

Since
2.6

Field Summary

Modifier and TypeField and Description
public static final OptBoolean
DEFAULT

Value that indicates that the annotation property does NOT have an explicit definition of enabled/disabled (or true/false); instead, a higher-level configuration value is used; or lacking higher-level global setting, default.

public static final OptBoolean
FALSE

Value that indicates that the annotation property is explicitly defined to be disabled, or false.

public static final OptBoolean
TRUE

Value that indicates that the annotation property is explicitly defined to be enabled, or true.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Boolean
public boolean
public static boolean
public static OptBoolean
public static OptBoolean
public static OptBoolean[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFAULTback to summary
public static final OptBoolean DEFAULT

Value that indicates that the annotation property does NOT have an explicit definition of enabled/disabled (or true/false); instead, a higher-level configuration value is used; or lacking higher-level global setting, default.

FALSEback to summary
public static final OptBoolean FALSE

Value that indicates that the annotation property is explicitly defined to be disabled, or false.

TRUEback to summary
public static final OptBoolean TRUE

Value that indicates that the annotation property is explicitly defined to be enabled, or true.

Constructor Detail

OptBooleanback to summary
private OptBoolean()

Method Detail

asBooleanback to summary
public Boolean asBoolean()
asPrimitiveback to summary
public boolean asPrimitive()
equalsback to summary
public static boolean equals(Boolean b1, Boolean b2)
fromBooleanback to summary
public static OptBoolean fromBoolean(Boolean b)
valueOfback to summary
public static OptBoolean valueOf(String name)
valuesback to summary
public static OptBoolean[] values()