Interface JoinableEncoder<From,To>

Type Parameters:
From - the type of object to encode
To - the type of the encoded object
All Superinterfaces:
Encoder<From,To>
All Known Subinterfaces:
JoinablePrimitiveEncoder<To>, ObjectConverter<From>
All Known Implementing Classes:
ByteBufConverter, JacksonByteBufConverter, JacksonStringConverter, ParameterConverter, StringCompositeConverter, StringConverter, TextByteBufMediaTypeConverter

public interface JoinableEncoder<From,To> extends Encoder<From,To>

An encoder that can encode a collection of objects into a single object.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends From>
    To
    encodeArray(T[] value)
    Encodes the specified array of values to the encoded type.
    <T extends From>
    To
    encodeArray(T[] value, Class<T> type)
    Encodes the specified array of values whose type is represented by the specified class to the encoded type.
    <T extends From>
    To
    encodeArray(T[] value, Type type)
    Encodes the specified array of values whose type is represented by the specified class to the encoded type.
    <T extends From>
    To
    encodeList(List<T> value)
    Encodes the specified list of values to an encoded value.
    <T extends From>
    To
    encodeList(List<T> value, Class<T> type)
    Encodes the specified list of values whose type is represented by the specified class to an encoded value.
    <T extends From>
    To
    encodeList(List<T> value, Type type)
    Encodes the specified list of values whose type is the specified type to an encoded value.
    <T extends From>
    To
    encodeSet(Set<T> value)
    Encodes the specified set of values to an encoded value.
    <T extends From>
    To
    encodeSet(Set<T> value, Class<T> type)
    Encodes the specified set of values whose type is represented by the specified class to an encoded value.
    <T extends From>
    To
    encodeSet(Set<T> value, Type type)
    Encodes the specified set of values whose type is the specified type to an encoded value.

    Methods inherited from interface io.inverno.mod.base.converter.Encoder

    encode, encode, encode
  • Method Details

    • encodeList

      <T extends From> To encodeList(List<T> value) throws ConverterException

      Encodes the specified list of values to an encoded value.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the list of objects to encode
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value
    • encodeList

      <T extends From> To encodeList(List<T> value, Class<T> type) throws ConverterException

      Encodes the specified list of values whose type is represented by the specified class to an encoded value.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the list of objects to encode
      type - the class of the decoded object
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value
    • encodeList

      <T extends From> To encodeList(List<T> value, Type type) throws ConverterException

      Encodes the specified list of values whose type is the specified type to an encoded value.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the list of objects to encode
      type - the type of the decoded object
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value
    • encodeSet

      <T extends From> To encodeSet(Set<T> value) throws ConverterException

      Encodes the specified set of values to an encoded value.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the set of objects to encode
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value
    • encodeSet

      <T extends From> To encodeSet(Set<T> value, Class<T> type) throws ConverterException

      Encodes the specified set of values whose type is represented by the specified class to an encoded value.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the set of objects to encode
      type - the class of the decoded object
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value
    • encodeSet

      <T extends From> To encodeSet(Set<T> value, Type type) throws ConverterException

      Encodes the specified set of values whose type is the specified type to an encoded value.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the set of objects to encode
      type - the type of the decoded object
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value
    • encodeArray

      <T extends From> To encodeArray(T[] value) throws ConverterException

      Encodes the specified array of values to the encoded type.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the array of objects to encode
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value
    • encodeArray

      <T extends From> To encodeArray(T[] value, Class<T> type) throws ConverterException

      Encodes the specified array of values whose type is represented by the specified class to the encoded type.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the array of objects to encode
      type - the class of the decoded object
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value
    • encodeArray

      <T extends From> To encodeArray(T[] value, Type type) throws ConverterException

      Encodes the specified array of values whose type is represented by the specified class to the encoded type.

      Type Parameters:
      T - the type of the decoded object
      Parameters:
      value - the array of objects to encode
      type - the class of the decoded object
      Returns:
      an encoded value
      Throws:
      ConverterException - if there was an error encoding the value