Package com.io7m.cedarbridge.runtime.api

# Class CBOptionSerializer<T extends CBSerializableType>

java.lang.Object
com.io7m.cedarbridge.runtime.api.CBAbstractSerializer<CBOptionType<T>>
com.io7m.cedarbridge.runtime.api.CBOptionSerializer<T>

Type Parameters:
  `T` - The type of value

All Implemented Interfaces:
  `CBSerializerType<CBOptionType<T>>`

public final class CBOptionSerializer<T extends CBSerializableType> extends CBAbstractSerializer<CBOptionType<T>>
A serializer of optional values.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CBOptionSerializer(CBSerializerType<T> inItemSerializer)`
  A serializer of optional values.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CBOptionType<T>`
  `deserialize(CBSerializationContextType context)`
  Deserialize a value of the given type.
  `void`
  `serialize(CBSerializationContextType context, CBOptionType<T> value)`
  Serialize a value of the given type.

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

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

- ## Constructor Details

  - ### CBOptionSerializer

    public CBOptionSerializer(CBSerializerType<T> inItemSerializer)
    A serializer of optional values.
    Parameters:
      `inItemSerializer` - The serializer for the held values

- ## Method Details

  - ### serialize

    public void serialize(CBSerializationContextType context, CBOptionType<T> value) throws IOException
    Description copied from interface: `CBSerializerType`
    Serialize a value of the given type.
    Parameters:
      `context` - The serialization context
      `value` - The value to be serialized
    Throws:
      `IOException` - On I/O errors

  - ### deserialize

    public CBOptionType<T> deserialize(CBSerializationContextType context) throws IOException
    Description copied from interface: `CBSerializerType`
    Deserialize a value of the given type.
    Parameters:
      `context` - The serialization context
    Returns:
      A deserialized value
    Throws:
      `IOException` - On I/O errors