- Type Parameters:
From
- the type of object to encodeTo
- 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
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 TypeMethodDescriptionencodeArray
(T[] value) Encodes the specified array of values to the encoded type.encodeArray
(T[] value, Class<T> type) Encodes the specified array of values whose type is represented by the specified class to the encoded type.encodeArray
(T[] value, Type type) Encodes the specified array of values whose type is represented by the specified class to the encoded type.encodeList
(List<T> value) Encodes the specified list of values to an encoded value.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.encodeList
(List<T> value, Type type) Encodes the specified list of values whose type is the specified type to an encoded value.Encodes the specified set of values to an encoded value.Encodes the specified set of values whose type is represented by the specified class to an encoded value.Encodes the specified set of values whose type is the specified type to an encoded value.
-
Method Details
-
encodeList
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
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 encodetype
- the class of the decoded object- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encodeList
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 encodetype
- the type of the decoded object- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encodeSet
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
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 encodetype
- the class of the decoded object- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encodeSet
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 encodetype
- the type of the decoded object- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encodeArray
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
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 encodetype
- the class of the decoded object- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-
encodeArray
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 encodetype
- the class of the decoded object- Returns:
- an encoded value
- Throws:
ConverterException
- if there was an error encoding the value
-