Class PrimitiveSerializers.IntegerSerializer
java.lang.Object
tech.guilhermekaua.spigotboot.config.serialization.scalars.PrimitiveSerializers.IntegerSerializer
- All Implemented Interfaces:
TypeSerializer<Integer>
- Enclosing class:
- PrimitiveSerializers
public static class PrimitiveSerializers.IntegerSerializer
extends Object
implements TypeSerializer<Integer>
Serializer for Integer values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(@NotNull ConfigNode node, @NotNull Class<Integer> type) Deserializes a configuration node to the target type.voidserialize(@NotNull Integer value, @NotNull MutableConfigNode node) Serializes a value to a configuration node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tech.guilhermekaua.spigotboot.config.serialization.TypeSerializer
canHandle
-
Constructor Details
-
IntegerSerializer
public IntegerSerializer()
-
-
Method Details
-
deserialize
public Integer deserialize(@NotNull @NotNull ConfigNode node, @NotNull @NotNull Class<Integer> type) Description copied from interface:TypeSerializerDeserializes a configuration node to the target type.- Specified by:
deserializein interfaceTypeSerializer<Integer>- Parameters:
node- the source nodetype- the target type class- Returns:
- the deserialized value
-
serialize
Description copied from interface:TypeSerializerSerializes a value to a configuration node.- Specified by:
serializein interfaceTypeSerializer<Integer>- Parameters:
value- the value to serializenode- the target node
-