Class TimerKey.Serializer
java.lang.Object
com.inductiveautomation.ignition.common.script.TimerKey.Serializer
- All Implemented Interfaces:
ResourceAttributeSerializer<TimerKey>
- Enclosing class:
- TimerKey
public static class TimerKey.Serializer
extends Object
implements ResourceAttributeSerializer<TimerKey>
Serializer for encoding and decoding
TimerKey
attributes-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecodeFromResource
(Resource resource) Decodes the given object from the provided Resource by extracting its attribute fields.encodeToResource
(TimerKey key) Encodes the given object into resource attribute fields.
-
Constructor Details
-
Serializer
public Serializer()
-
-
Method Details
-
encodeToResource
Description copied from interface:ResourceAttributeSerializer
Encodes the given object into resource attribute fields.- Specified by:
encodeToResource
in interfaceResourceAttributeSerializer<TimerKey>
- Parameters:
key
- the object to encode- Returns:
- a Consumer that modifies the ResourceBuilder by setting the relevant attributes of the given object
-
decodeFromResource
Description copied from interface:ResourceAttributeSerializer
Decodes the given object from the provided Resource by extracting its attribute fields.- Specified by:
decodeFromResource
in interfaceResourceAttributeSerializer<TimerKey>
- Parameters:
resource
- the resource object from which the object should be decoded- Returns:
- the decoded object
-