Interface KeyedEncodingContainer<T extends Enum<T>>

Type Parameters:
T - Type of CodingKeys used for encoding
All Known Implementing Classes:
PreferencesEncoder

public interface KeyedEncodingContainer<T extends Enum<T>>
A container for encoding keyed values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    encode(@Nullable Boolean value, T forKey)
    Encode a Boolean value into a specified key
    void
    encode(@Nullable Integer value, T forKey)
    Encode an Integer value into a specified key
    void
    encode(@Nullable String value, T forKey)
    Encode a String value into a specified key
  • Method Details

    • encode

      void encode(@Nullable @Nullable Integer value, T forKey) throws EncodingException
      Encode an Integer value into a specified key
      Parameters:
      value - Value to encode
      forKey - Key to encode value into
      Throws:
      EncodingException - If encoding of this key failed
    • encode

      void encode(@Nullable @Nullable Boolean value, T forKey) throws EncodingException
      Encode a Boolean value into a specified key
      Parameters:
      value - Value to encode
      forKey - Key to encode value into
      Throws:
      EncodingException - If encoding of this key failed
    • encode

      void encode(@Nullable @Nullable String value, T forKey) throws EncodingException
      Encode a String value into a specified key
      Parameters:
      value - Value to encode
      forKey - Key to encode value into
      Throws:
      EncodingException - If encoding of this key failed