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 types:
BooleanLongDoubleString- (Nested)
Lists of the other types - (Nested)
Sets of the other types - (Nested)
Maps of the other types
That means that if you want to support all currently available configuration store formats,
your Serializer implementation should convert an object of type T1 into one
of the seven types listed above.
-
Method Summary
-
Method Details
-
serialize
Serializes an element of typeT1into an element of typeT2.- 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
-