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