Class IndividualAddressJsonDeserializer
- java.lang.Object
-
- li.pitschmann.knx.core.plugin.api.v1.gson.AbstractKnxAddressJsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>
-
- li.pitschmann.knx.core.plugin.api.v1.gson.IndividualAddressJsonDeserializer
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>
public final class IndividualAddressJsonDeserializer extends AbstractKnxAddressJsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>
De-Serializes a JSON format of group address to an instance ofIndividualAddressSupported JSON formats:
{"type":0,"raw":[-61,45]} [-61,45] "12.3.45"
-
-
Field Summary
Fields Modifier and Type Field Description static IndividualAddressJsonDeserializerINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected li.pitschmann.knx.core.address.IndividualAddressconvert(byte[] addressArray)Creates a new instance ofKnxAddressfrom givenaddressbyte arrayprotected li.pitschmann.knx.core.address.IndividualAddressconvert(String address)Creates a new instance ofKnxAddressfrom givenStringprotected li.pitschmann.knx.core.address.AddressTypesupportedAddressType()Returns the AddressType that is supported for this de-serialization-
Methods inherited from class li.pitschmann.knx.core.plugin.api.v1.gson.AbstractKnxAddressJsonDeserializer
deserialize
-
-
-
-
Field Detail
-
INSTANCE
public static final IndividualAddressJsonDeserializer INSTANCE
-
-
Method Detail
-
supportedAddressType
protected li.pitschmann.knx.core.address.AddressType supportedAddressType()
Description copied from class:AbstractKnxAddressJsonDeserializerReturns the AddressType that is supported for this de-serialization- Specified by:
supportedAddressTypein classAbstractKnxAddressJsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>- Returns:
- an instance of
AddressType
-
convert
protected li.pitschmann.knx.core.address.IndividualAddress convert(byte[] addressArray)
Description copied from class:AbstractKnxAddressJsonDeserializerCreates a new instance ofKnxAddressfrom givenaddressbyte array- Specified by:
convertin classAbstractKnxAddressJsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>- Parameters:
addressArray- byte array to be converted toKnxAddress- Returns:
- an instance of KnxAddress (Individual or Group Address)
-
convert
protected li.pitschmann.knx.core.address.IndividualAddress convert(String address)
Description copied from class:AbstractKnxAddressJsonDeserializerCreates a new instance ofKnxAddressfrom givenString- Specified by:
convertin classAbstractKnxAddressJsonDeserializer<li.pitschmann.knx.core.address.IndividualAddress>- Parameters:
address- address to be converted toKnxAddress- Returns:
- address instance of KnxAddress (Individual or Group Address)
-
-