Enum Class 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, Serializable, Comparable<UnitApiFeature>, Constable

public enum UnitApiFeature extends Enum<UnitApiFeature> implements com.fasterxml.jackson.core.FormatFeature
  • Enum Constant Details

    • 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 Details

    • values

      public static UnitApiFeature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UnitApiFeature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • enabledByDefault

      public boolean enabledByDefault()
      Specified by:
      enabledByDefault in interface com.fasterxml.jackson.core.FormatFeature
      Specified by:
      enabledByDefault in interface com.fasterxml.jackson.core.util.JacksonFeature
    • getMask

      public int getMask()
      Specified by:
      getMask in interface com.fasterxml.jackson.core.FormatFeature
      Specified by:
      getMask in interface com.fasterxml.jackson.core.util.JacksonFeature
    • enabledIn

      public boolean enabledIn(int flags)
      Specified by:
      enabledIn in interface com.fasterxml.jackson.core.FormatFeature
      Specified by:
      enabledIn in interface com.fasterxml.jackson.core.util.JacksonFeature