JsonFormat.Value
Date: 2016-12-03

com.fasterxml.jackson.annotation

## Class JsonFormat.Value

- java.lang.Object
- - com.fasterxml.jackson.annotation.JsonFormat.Value

- All Implemented Interfaces:
    JacksonAnnotationValue<JsonFormat>, java.io.Serializable
  Enclosing class:
    JsonFormat

      public static class JsonFormat.Value
      extends java.lang.Object
      implements JacksonAnnotationValue<JsonFormat>, java.io.Serializable

  Helper class used to contain information from a single `JsonFormat` annotation.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonFormat.Value()`
    `JsonFormat.Value(JsonFormat ann)`
    `JsonFormat.Value(java.lang.String p, JsonFormat.Shape sh, java.util.Locale l, java.lang.String tzStr, java.util.TimeZone tz)` Deprecated. since 2.6
    `JsonFormat.Value(java.lang.String p, JsonFormat.Shape sh, java.util.Locale l, java.lang.String tzStr, java.util.TimeZone tz, JsonFormat.Features f)`
    `JsonFormat.Value(java.lang.String p, JsonFormat.Shape sh, java.util.Locale l, java.util.TimeZone tz)` Deprecated. since 2.6
    `JsonFormat.Value(java.lang.String p, JsonFormat.Shape sh, java.util.Locale l, java.util.TimeZone tz, JsonFormat.Features f)`
    `JsonFormat.Value(java.lang.String p, JsonFormat.Shape sh, java.lang.String localeStr, java.lang.String tzStr)` Deprecated. since 2.6
    `JsonFormat.Value(java.lang.String p, JsonFormat.Shape sh, java.lang.String localeStr, java.lang.String tzStr, JsonFormat.Features f)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JsonFormat.Value` | `empty()`
    `boolean` | `equals(java.lang.Object o)`
    `static JsonFormat.Value` | `forPattern(java.lang.String p)`
    `static JsonFormat.Value` | `forShape(JsonFormat.Shape sh)`
    `static JsonFormat.Value` | `from(JsonFormat ann)`
    `java.lang.Boolean` | `getFeature(JsonFormat.Feature f)` Accessor for checking whether this format value has specific setting for given feature.
    `JsonFormat.Features` | `getFeatures()` Accessor for getting full set of features enabled/disabled.
    `java.util.Locale` | `getLocale()`
    `java.lang.String` | `getPattern()`
    `JsonFormat.Shape` | `getShape()`
    `java.util.TimeZone` | `getTimeZone()`
    `int` | `hashCode()`
    `boolean` | `hasLocale()`
    `boolean` | `hasPattern()`
    `boolean` | `hasShape()`
    `boolean` | `hasTimeZone()`
    `static JsonFormat.Value` | `merge(JsonFormat.Value base, JsonFormat.Value overrides)` Helper method that will try to combine values from two `JsonFormat.Value` instances, using one as base settings, and the other as overrides to use instead of base values when defined; base values are only use if override does not specify a value (matching value is null or logically missing).
    `static JsonFormat.Value` | `mergeAll(JsonFormat.Value... values)`
    `java.lang.String` | `timeZoneAsString()` Alternate access (compared to `getTimeZone()`) which is useful when caller just wants time zone id to convert, but not as JDK provided `TimeZone`
    `java.lang.String` | `toString()`
    `java.lang.Class<JsonFormat>` | `valueFor()` Introspection method that may be used to find actual annotation that may be used as the source for value instance.
    `JsonFormat.Value` | `withFeature(JsonFormat.Feature f)`
    `JsonFormat.Value` | `withLocale(java.util.Locale l)`
    `JsonFormat.Value` | `withoutFeature(JsonFormat.Feature f)`
    `JsonFormat.Value` | `withOverrides(JsonFormat.Value overrides)`
    `JsonFormat.Value` | `withPattern(java.lang.String p)`
    `JsonFormat.Value` | `withShape(JsonFormat.Shape s)`
    `JsonFormat.Value` | `withTimeZone(java.util.TimeZone tz)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### JsonFormat.Value

          public JsonFormat.Value()

    - #### JsonFormat.Value

          public JsonFormat.Value(JsonFormat ann)

    - #### JsonFormat.Value

          public JsonFormat.Value(java.lang.String p,
                          JsonFormat.Shape sh,
                          java.lang.String localeStr,
                          java.lang.String tzStr,
                          JsonFormat.Features f)

      Since:
        2.6

    - #### JsonFormat.Value

          public JsonFormat.Value(java.lang.String p,
                          JsonFormat.Shape sh,
                          java.util.Locale l,
                          java.util.TimeZone tz,
                          JsonFormat.Features f)

      Since:
        2.6

    - #### JsonFormat.Value

          public JsonFormat.Value(java.lang.String p,
                          JsonFormat.Shape sh,
                          java.util.Locale l,
                          java.lang.String tzStr,
                          java.util.TimeZone tz,
                          JsonFormat.Features f)

      Since:
        2.6

    - #### JsonFormat.Value

          @Deprecated
          public JsonFormat.Value(java.lang.String p,
                                     JsonFormat.Shape sh,
                                     java.util.Locale l,
                                     java.util.TimeZone tz)

      Deprecated. since 2.6

    - #### JsonFormat.Value

          @Deprecated
          public JsonFormat.Value(java.lang.String p,
                                     JsonFormat.Shape sh,
                                     java.lang.String localeStr,
                                     java.lang.String tzStr)

      Deprecated. since 2.6

    - #### JsonFormat.Value

          @Deprecated
          public JsonFormat.Value(java.lang.String p,
                                     JsonFormat.Shape sh,
                                     java.util.Locale l,
                                     java.lang.String tzStr,
                                     java.util.TimeZone tz)

      Deprecated. since 2.6

  - ### Method Detail

    - #### empty

          public static final JsonFormat.Value empty()

      Since:
        2.7

    - #### merge

          public static JsonFormat.Value merge(JsonFormat.Value base,
                               JsonFormat.Value overrides)

      Helper method that will try to combine values from two `JsonFormat.Value` instances, using one as base settings, and the other as overrides to use instead of base values when defined; base values are only use if override does not specify a value (matching value is null or logically missing). Note that one or both of value instances may be `null`, directly; if both are `null`, result will also be `null`; otherwise never null.
      Since:
        2.8

    - #### mergeAll

          public static JsonFormat.Value mergeAll(JsonFormat.Value... values)

      Since:
        2.8

    - #### from

          public static final JsonFormat.Value from(JsonFormat ann)

      Since:
        2.7

    - #### withOverrides

          public final JsonFormat.Value withOverrides(JsonFormat.Value overrides)

      Since:
        2.7

    - #### forPattern

          public static JsonFormat.Value forPattern(java.lang.String p)

      Since:
        2.6

    - #### forShape

          public static JsonFormat.Value forShape(JsonFormat.Shape sh)

      Since:
        2.7

    - #### withPattern

          public JsonFormat.Value withPattern(java.lang.String p)

      Since:
        2.1

    - #### withShape

          public JsonFormat.Value withShape(JsonFormat.Shape s)

      Since:
        2.1

    - #### withLocale

          public JsonFormat.Value withLocale(java.util.Locale l)

      Since:
        2.1

    - #### withTimeZone

          public JsonFormat.Value withTimeZone(java.util.TimeZone tz)

      Since:
        2.1

    - #### withFeature

          public JsonFormat.Value withFeature(JsonFormat.Feature f)

      Since:
        2.6

    - #### withoutFeature

          public JsonFormat.Value withoutFeature(JsonFormat.Feature f)

      Since:
        2.6

    - #### valueFor

          public java.lang.Class<JsonFormat> valueFor()

      Description copied from interface: `JacksonAnnotationValue`
      Introspection method that may be used to find actual annotation that may be used as the source for value instance.
      Specified by:
        `valueFor` in interface `JacksonAnnotationValue<JsonFormat>`

    - #### getPattern

          public java.lang.String getPattern()

    - #### getShape

          public JsonFormat.Shape getShape()

    - #### getLocale

          public java.util.Locale getLocale()

    - #### timeZoneAsString

          public java.lang.String timeZoneAsString()

      Alternate access (compared to `getTimeZone()`) which is useful when caller just wants time zone id to convert, but not as JDK provided `TimeZone`
      Since:
        2.4

    - #### getTimeZone

          public java.util.TimeZone getTimeZone()

    - #### hasShape

          public boolean hasShape()

      Since:
        2.4

    - #### hasPattern

          public boolean hasPattern()

      Since:
        2.4

    - #### hasLocale

          public boolean hasLocale()

      Since:
        2.4

    - #### hasTimeZone

          public boolean hasTimeZone()

      Since:
        2.4

    - #### getFeature

          public java.lang.Boolean getFeature(JsonFormat.Feature f)

      Accessor for checking whether this format value has specific setting for given feature. Result is 3-valued with either `null`, `Boolean.TRUE` or `Boolean.FALSE`, indicating 'yes/no/dunno' choices, where `null` ("dunno") indicates that the default handling should be used based on global defaults, and there is no format override.
      Since:
        2.6

    - #### getFeatures

          public JsonFormat.Features getFeatures()

      Accessor for getting full set of features enabled/disabled.
      Since:
        2.8

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`