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 singleBooleanat a given codingKey.decodeBooleanIfPresent(T forKey) Decodes a singleBooleanat a given codingKey.decodeInteger(T forKey) Decodes a singleIntegerat a given codingKey.decodeIntegerIfPresent(T forKey) Decodes a singleIntegerat a given codingKey.decodeString(T forKey) Decodes a singleStringat a given codingKey.decodeStringIfPresent(T forKey) Decodes a singleStringat a given codingKey.
-
Method Details
-
decodeBooleanIfPresent
Decodes a singleBooleanat a given codingKey.- Parameters:
forKey- codingKey to attempt to decode value from- Returns:
OptionaldecodedBoolean- Throws:
DecodingException- If decoding fails for whatever reason
-
decodeBoolean
Decodes a singleBooleanat 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 singleIntegerat 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 singleIntegerat 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 singleStringat 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 singleStringat 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
-