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:ResourceAttributeSerializerEncodes the given object into resource attribute fields.- Specified by:
encodeToResourcein 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:ResourceAttributeSerializerDecodes the given object from the provided Resource by extracting its attribute fields.- Specified by:
decodeFromResourcein interfaceResourceAttributeSerializer<KeyEvent>- Parameters:
resource- the resource object from which the object should be decoded- Returns:
- the decoded object
-