org.qi4j.api.value

## Class ValueSerializer.Options

- java.lang.Object
- - org.qi4j.api.value.ValueSerializer.Options

- Enclosing interface:
    ValueSerializer

      public static final class ValueSerializer.Options
      extends Object

  Serialization options.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `INCLUDE_TYPE_INFO` Boolean flag to include type information.
    `static String` | `MAP_ENTRIES_AS_OBJECTS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValueSerializer.Options()` Create new default ValueSerializer Options.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Boolean` | `getBoolean(String option)` Get Boolean option value.
    `Integer` | `getInteger(String option)` Get Integer option value.
    `String` | `getString(String option)` Get String option value.
    `ValueSerializer.Options` | `put(String option, Boolean value)` Put an option boolean value.
    `ValueSerializer.Options` | `put(String option, Integer value)` Put an option Integer value.
    `ValueSerializer.Options` | `put(String option, String value)` Put an option String value.
    `ValueSerializer.Options` | `remove(String option)` Remove an option value.
    `Map<String,String>` | `toMap()` Get all defined options as a Map.
    `ValueSerializer.Options` | `withMapEntriesAsKeyValuePairs()`
    `ValueSerializer.Options` | `withMapEntriesAsObjects()`
    `ValueSerializer.Options` | `withoutTypeInfo()` Set `INCLUDE_TYPE_INFO` option to FALSE.
    `ValueSerializer.Options` | `withTypeInfo()` Set `INCLUDE_TYPE_INFO` option to TRUE.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INCLUDE_TYPE_INFO

          public static final String INCLUDE_TYPE_INFO

      Boolean flag to include type information. Default to TRUE.
      See Also:
        Constant Field Values

    - #### MAP_ENTRIES_AS_OBJECTS

          public static final String MAP_ENTRIES_AS_OBJECTS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ValueSerializer.Options

          public ValueSerializer.Options()

      Create new default ValueSerializer Options.

  - ### Method Detail

    - #### withTypeInfo

          public ValueSerializer.Options withTypeInfo()

      Set `INCLUDE_TYPE_INFO` option to TRUE.
      Returns:
        This

    - #### withoutTypeInfo

          public ValueSerializer.Options withoutTypeInfo()

      Set `INCLUDE_TYPE_INFO` option to FALSE.
      Returns:
        This

    - #### withMapEntriesAsObjects

          public ValueSerializer.Options withMapEntriesAsObjects()

    - #### withMapEntriesAsKeyValuePairs

          public ValueSerializer.Options withMapEntriesAsKeyValuePairs()

    - #### getBoolean

          public Boolean getBoolean(String option)

      Get Boolean option value.
      Parameters:
        `option` - The option
      Returns:
        The boolean value of the option, or null if absent

    - #### getInteger

          public Integer getInteger(String option)

      Get Integer option value.
      Parameters:
        `option` - The option
      Returns:
        The integer value of the option, or null if absent

    - #### getString

          public String getString(String option)

      Get String option value.
      Parameters:
        `option` - The option
      Returns:
        The string value of the option, or null if absent

    - #### put

          public ValueSerializer.Options put(String option,
                                    String value)

      Put an option String value.
      Parameters:
        `option` - The option
        `value` - The value
      Returns:
        This Options instance

    - #### put

          public ValueSerializer.Options put(String option,
                                    Boolean value)

      Put an option boolean value.
      Parameters:
        `option` - The option
        `value` - The value
      Returns:
        This Options instance

    - #### put

          public ValueSerializer.Options put(String option,
                                    Integer value)

      Put an option Integer value.
      Parameters:
        `option` - The option
        `value` - The value
      Returns:
        This Options instance

    - #### remove

          public ValueSerializer.Options remove(String option)

      Remove an option value.
      Parameters:
        `option` - The option
      Returns:
        This Options instance

    - #### toMap

          public Map<String,String> toMap()

      Get all defined options as a Map.
      Returns:
        All defined options in a new Map