Enum UnitApiFeature
- java.lang.Object
-
- java.lang.Enum<UnitApiFeature>
-
- com.raynigon.unit_api.jackson.config.UnitApiFeature
-
- All Implemented Interfaces:
com.fasterxml.jackson.core.FormatFeature
,com.fasterxml.jackson.core.util.JacksonFeature
,java.io.Serializable
,java.lang.Comparable<UnitApiFeature>
public enum UnitApiFeature extends java.lang.Enum<UnitApiFeature> implements com.fasterxml.jackson.core.FormatFeature
-
-
Enum Constant Summary
Enum Constants Enum Constant Description SYSTEM_UNIT_ON_MISSING_ANNOTATION
If no Annotation is present and no unit was given in the value string, the system unit should be used for the value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
enabledByDefault()
boolean
enabledIn(int flags)
int
getMask()
static UnitApiFeature
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static UnitApiFeature[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SYSTEM_UNIT_ON_MISSING_ANNOTATION
public static final UnitApiFeature SYSTEM_UNIT_ON_MISSING_ANNOTATION
If no Annotation is present and no unit was given in the value string, the system unit should be used for the value. E.g. given document {"speed": 10} will be converted to "10 m/s", since the system unit for speed is m/s
-
-
Method Detail
-
values
public static UnitApiFeature[] 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 (UnitApiFeature c : UnitApiFeature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UnitApiFeature valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
enabledByDefault
public boolean enabledByDefault()
- Specified by:
enabledByDefault
in interfacecom.fasterxml.jackson.core.FormatFeature
- Specified by:
enabledByDefault
in interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
getMask
public int getMask()
- Specified by:
getMask
in interfacecom.fasterxml.jackson.core.FormatFeature
- Specified by:
getMask
in interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
enabledIn
public boolean enabledIn(int flags)
- Specified by:
enabledIn
in interfacecom.fasterxml.jackson.core.FormatFeature
- Specified by:
enabledIn
in interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
-