Package org.djutils.data.serialization
Class PrimitiveSerializer.Int
java.lang.Object
org.djutils.data.serialization.PrimitiveSerializer.Int
- All Implemented Interfaces:
TextSerializer<Integer>
- Enclosing class:
- PrimitiveSerializer
public static class PrimitiveSerializer.Int extends Object implements TextSerializer<Integer>
Serializer and deserializer for int.
-
Constructor Summary
Constructors Constructor Description Int()
-
Method Summary
-
Constructor Details
-
Int
public Int()
-
-
Method Details
-
serialize
Serialize a value to text in such a way that it can be deserialized with the corresponding deserializer.- Specified by:
serialize
in interfaceTextSerializer<Integer>
- Parameters:
value
- T; the value to serialize- Returns:
- String; a string representation of the value that can later be deserialized
-
deserialize
Deserialize a value from text that has been created with the corresponding serializer.- Specified by:
deserialize
in interfaceTextSerializer<Integer>
- Parameters:
text
- String; the string to deserialize- Returns:
- T; an instance of the object created with the corresponding serializer
-