Class AbstractKnxAddressJsonDeserializer<T extends KnxAddress>

    • Constructor Detail

      • AbstractKnxAddressJsonDeserializer

        public AbstractKnxAddressJsonDeserializer()
    • Method Detail

      • deserialize

        public T deserialize​(com.google.gson.JsonElement jsonElement,
                             Type type,
                             com.google.gson.JsonDeserializationContext jsonDeserializationContext)
        Specified by:
        deserialize in interface com.google.gson.JsonDeserializer<T extends KnxAddress>
      • supportedAddressType

        protected abstract AddressType supportedAddressType()
        Returns the AddressType that is supported for this de-serialization
        Returns:
        an instance of AddressType
      • convert

        protected abstract T convert​(byte[] address)
        Creates a new instance of KnxAddress from given address byte array
        Parameters:
        address - byte array to be converted to KnxAddress
        Returns:
        an instance of KnxAddress (Individual or Group Address)
      • convert

        protected abstract T convert​(String address)
        Creates a new instance of KnxAddress from given String
        Parameters:
        address - address to be converted to KnxAddress
        Returns:
        address instance of KnxAddress (Individual or Group Address)