com.activeandroid.serializer.UUIDSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activeandroidrx Show documentation
Show all versions of activeandroidrx Show documentation
ActiveAndroid fork with reactive extensions.
The newest version!
package com.activeandroid.serializer;
import java.util.UUID;
public final class UUIDSerializer extends TypeSerializer {
public Class> getDeserializedType() {
return UUID.class;
}
public Class> getSerializedType() {
return String.class;
}
public String serialize(Object data) {
if (data == null) {
return null;
}
return ((UUID) data).toString();
}
public UUID deserialize(Object data) {
if (data == null) {
return null;
}
return UUID.fromString((String)data);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy