Class KeyEvent.Serializer
java.lang.Object
com.inductiveautomation.perspective.common.config.KeyEvent.Serializer
- All Implemented Interfaces:
ResourceAttributeSerializer<KeyEvent>
- Enclosing class:
- KeyEvent
public static class KeyEvent.Serializer
extends Object
implements ResourceAttributeSerializer<KeyEvent>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecodeFromResource
(Resource resource) Decodes the given object from the provided Resource by extracting its attribute fields.encodeToResource
(KeyEvent keyEvent) 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<KeyEvent>
- Parameters:
keyEvent
- 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<KeyEvent>
- Parameters:
resource
- the resource object from which the object should be decoded- Returns:
- the decoded object
-