Module com.cryptoalgo.oursql.oursql
Package com.cryptoalgo.codable
Interface KeyedDecodingContainer<T extends Enum<T>>
- Type Parameters:
T
- The type of the codingKeys enum used for decoding
- All Known Implementing Classes:
PreferencesDecoder
public interface KeyedDecodingContainer<T extends Enum<T>>
A keyed decoding container for use by
Decodable
classes during decoding
Decodable
classes can retrieve an instance of
a keyed decoding container by calling Decoder.container()
in their decoding constructor.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondecodeBoolean
(T forKey) Decodes a singleBoolean
at a given codingKey.decodeBooleanIfPresent
(T forKey) Decodes a singleBoolean
at a given codingKey.decodeInteger
(T forKey) Decodes a singleInteger
at a given codingKey.decodeIntegerIfPresent
(T forKey) Decodes a singleInteger
at a given codingKey.decodeString
(T forKey) Decodes a singleString
at a given codingKey.decodeStringIfPresent
(T forKey) Decodes a singleString
at a given codingKey.
-
Method Details
-
decodeBooleanIfPresent
Decodes a singleBoolean
at a given codingKey.- Parameters:
forKey
- codingKey to attempt to decode value from- Returns:
Optional
decodedBoolean
- Throws:
DecodingException
- If decoding fails for whatever reason
-
decodeBoolean
Decodes a singleBoolean
at a given codingKey.- Parameters:
forKey
- codingKey to attempt to decode value from- Returns:
- Decoded
Boolean
- Throws:
DecodingException
- If decoding fails for whatever reasonNoSuchElementException
- If the value at the requested key isn't present
-
decodeIntegerIfPresent
Decodes a singleInteger
at a given codingKey.- Parameters:
forKey
- codingKey to attempt to decode value from- Returns:
Optional<Integer>
decodedInteger
- Throws:
DecodingException
- If decoding fails for whatever reasonNoSuchElementException
-
decodeInteger
Decodes a singleInteger
at a given codingKey.- Parameters:
forKey
- codingKey to attempt to decode value from- Returns:
- Decoded
Integer
- Throws:
DecodingException
- If decoding fails for whatever reasonNoSuchElementException
- If the value at the requested key isn't present
-
decodeStringIfPresent
Decodes a singleString
at a given codingKey.- Parameters:
forKey
- codingKey to attempt to decode value from- Returns:
- Decoded
String
- Throws:
DecodingException
- If decoding fails for whatever reason
-
decodeString
Decodes a singleString
at a given codingKey.- Parameters:
forKey
- codingKey to attempt to decode value from- Returns:
Optional<String>
decodedString
- Throws:
DecodingException
- If decoding fails for whatever reasonNoSuchElementException
- If the value at the requested key isn't present
-