- All Implemented Interfaces:
Decoder<Object,
,Object> PrimitiveDecoder<Object>
,SplittableDecoder<Object,
,Object> SplittablePrimitiveDecoder<Object>
Object to object Decoder
implementation.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
Decodes the specified value to an object whose type is represented by the specified class.<T> T
Decodes the specified value to an object of the specified type.decodeBigDecimal
(Object value) Decodes to big decimal.decodeBigInteger
(Object value) Decodes to big integer.decodeBoolean
(Object value) Decodes to boolean.decodeByte
(Object value) Decodes to byte.decodeCharacter
(Object value) Decodes to character.Class
<?> decodeClass
(Object value) Decodes to class.decodeCurrency
(Object value) Decodes to currency.decodeDouble
(Object value) Decodes to double.decodeFile
(Object value) Decodes to file.decodeFloat
(Object value) Decodes to float.decodeInetAddress
(Object value) Decodes to inet address.decodeInetSocketAddress
(Object value) Decodes to inet socket address.decodeInteger
(Object value) Decodes to integer.decodeLocalDate
(Object value) Decodes to local date.decodeLocalDateTime
(Object value) Decodes to local datetime.decodeLocale
(Object value) Decodes to locale.decodeLong
(Object value) Decodes to long.decodePath
(Object value) Decodes to path.decodePattern
(Object value) Decodes to pattern.decodeShort
(Object value) Decodes to short.decodeString
(Object value) Decodes to string.<T> T[]
decodeToArray
(Object value, Class<T> type) Decodes the specified value whose type is represented by the specified class to an array of decoded values.<T> T[]
decodeToArray
(Object value, Type type) Decodes the specified value whose type is the specified type to an array of decoded values.<T> List
<T> decodeToList
(Object value, Class<T> type) Decodes the specified value whose type is represented by the specified class to a list of decoded values.<T> List
<T> decodeToList
(Object value, Type type) Decodes the specified value whose type is the specified type to a list of decoded values.<T> Set
<T> decodeToSet
(Object value, Class<T> type) Decodes the specified value whose type is represented by the specified class to a set of decoded values.<T> Set
<T> decodeToSet
(Object value, Type type) Decodes the specified value whose type is the specified type to a set of decoded values.Decodes to URI.Decodes to URL.decodeZonedDateTime
(Object value) Decodes to zoned datetime.
-
Constructor Details
-
ObjectDecoder
public ObjectDecoder()Creates a new Object decoder.
-
-
Method Details
-
decode
Description copied from interface:Decoder
Decodes the specified value to an object whose type is represented by the specified class.
-
decode
Description copied from interface:Decoder
Decodes the specified value to an object of the specified type.
- Specified by:
decode
in interfaceDecoder<Object,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the object to decodetype
- the type of the decoded object- Returns:
- a decoded object
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeToList
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is represented by the specified class to a list of decoded values.
- Specified by:
decodeToList
in interfaceSplittableDecoder<Object,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the class of the decoded object- Returns:
- a list of decoded values
-
decodeToList
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is the specified type to a list of decoded values.
- Specified by:
decodeToList
in interfaceSplittableDecoder<Object,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the type of the decoded object- Returns:
- a list of decoded values
-
decodeToSet
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is represented by the specified class to a set of decoded values.
- Specified by:
decodeToSet
in interfaceSplittableDecoder<Object,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the class of the decoded object- Returns:
- a set of decoded values
-
decodeToSet
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is the specified type to a set of decoded values.
- Specified by:
decodeToSet
in interfaceSplittableDecoder<Object,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the type of the decoded object- Returns:
- a set of decoded values
-
decodeToArray
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is represented by the specified class to an array of decoded values.
- Specified by:
decodeToArray
in interfaceSplittableDecoder<Object,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the class of the decoded object- Returns:
- an array of decoded values
-
decodeToArray
Description copied from interface:SplittableDecoder
Decodes the specified value whose type is the specified type to an array of decoded values.
- Specified by:
decodeToArray
in interfaceSplittableDecoder<Object,
Object> - Type Parameters:
T
- the type of the decoded object- Parameters:
value
- the value to decodetype
- the type of the decoded object- Returns:
- an array of decoded values
-
decodeByte
Description copied from interface:PrimitiveDecoder
Decodes to byte.
- Specified by:
decodeByte
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeShort
Description copied from interface:PrimitiveDecoder
Decodes to short.
- Specified by:
decodeShort
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeInteger
Description copied from interface:PrimitiveDecoder
Decodes to integer.
- Specified by:
decodeInteger
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeLong
Description copied from interface:PrimitiveDecoder
Decodes to long.
- Specified by:
decodeLong
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeFloat
Description copied from interface:PrimitiveDecoder
Decodes to float.
- Specified by:
decodeFloat
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeDouble
Description copied from interface:PrimitiveDecoder
Decodes to double.
- Specified by:
decodeDouble
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeCharacter
Description copied from interface:PrimitiveDecoder
Decodes to character.
- Specified by:
decodeCharacter
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeBoolean
Description copied from interface:PrimitiveDecoder
Decodes to boolean.
- Specified by:
decodeBoolean
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeString
Description copied from interface:PrimitiveDecoder
Decodes to string.
- Specified by:
decodeString
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeBigInteger
Description copied from interface:PrimitiveDecoder
Decodes to big integer.
- Specified by:
decodeBigInteger
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeBigDecimal
Description copied from interface:PrimitiveDecoder
Decodes to big decimal.
- Specified by:
decodeBigDecimal
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeLocalDate
Description copied from interface:PrimitiveDecoder
Decodes to local date.
- Specified by:
decodeLocalDate
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeLocalDateTime
Description copied from interface:PrimitiveDecoder
Decodes to local datetime.
- Specified by:
decodeLocalDateTime
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeZonedDateTime
Description copied from interface:PrimitiveDecoder
Decodes to zoned datetime.
- Specified by:
decodeZonedDateTime
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeCurrency
Description copied from interface:PrimitiveDecoder
Decodes to currency.
- Specified by:
decodeCurrency
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeLocale
Description copied from interface:PrimitiveDecoder
Decodes to locale.
- Specified by:
decodeLocale
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeFile
Description copied from interface:PrimitiveDecoder
Decodes to file.
- Specified by:
decodeFile
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodePath
Description copied from interface:PrimitiveDecoder
Decodes to path.
- Specified by:
decodePath
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeURI
Description copied from interface:PrimitiveDecoder
Decodes to URI.
- Specified by:
decodeURI
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeURL
Description copied from interface:PrimitiveDecoder
Decodes to URL.
- Specified by:
decodeURL
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodePattern
Description copied from interface:PrimitiveDecoder
Decodes to pattern.
- Specified by:
decodePattern
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeInetAddress
Description copied from interface:PrimitiveDecoder
Decodes to inet address.
- Specified by:
decodeInetAddress
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeInetSocketAddress
Description copied from interface:PrimitiveDecoder
Decodes to inet socket address.
- Specified by:
decodeInetSocketAddress
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-
decodeClass
Description copied from interface:PrimitiveDecoder
Decodes to class.
- Specified by:
decodeClass
in interfacePrimitiveDecoder<Object>
- Parameters:
value
- the encoded value to decode- Returns:
- a decoded value
- Throws:
ConverterException
- if there was an error decoding the value
-