Package de.exlll.configlib
Interface Serializer<T1,T2>
- Type Parameters:
T1- the type of the objects that should be serializedT2- the serializable type
public interface Serializer<T1,T2>
Implementations of this interface convert instances of type
T1 to a serializable type
T2 and vice versa.
Which types T2 are serializable depends on the underlying storage system. Currently,
all storage systems support the following target types:
BooleanLongDoubleString- (Nested)
Lists of the other types - (Nested)
Maps of the other types
For all custom serializers, T2 must be one of the six types listed above.
-
Method Summary
-
Method Details
-
serialize
Serializes an element of typeT1into an element of typeT2. TypeT2must be a valid target type.- Parameters:
element- the element of typeT1that is serialized- Returns:
- the serialized element of type
T2
-
deserialize
Deserializes an element of typeT2into an element of typeT1.- Parameters:
element- the element of typeT2that is deserialized- Returns:
- the deserialized element of type
T1
-