Madan Jampani
Committed by Gerrit Code Review

Added a utility method for creating store Serializer from a single KryoNamespace…

… and some additional classes

Change-Id: I1326759bf83a2e4f943ea52df8ebd7e9356c3a93
......@@ -53,6 +53,24 @@ public interface Serializer {
return using(Arrays.asList(kryo));
}
/**
* Creates a new Serializer instance from a KryoNamespace and some additional classes.
*
* @param namespace kryo namespace
* @param classes variable length array of classes to register
* @return Serializer instance
*/
static Serializer using(KryoNamespace namespace, Class<?>... classes) {
return using(Arrays.asList(namespace), classes);
}
/**
* Creates a new Serializer instance from a list of KryoNamespaces and some additional classes.
*
* @param namespaces kryo namespaces
* @param classes variable length array of classes to register
* @return Serializer instance
*/
static Serializer using(List<KryoNamespace> namespaces, Class<?>... classes) {
KryoNamespace.Builder builder = new KryoNamespace.Builder();
namespaces.forEach(builder::register);
......
......@@ -45,8 +45,8 @@ public class ExtendedSet<E> implements Set<E> {
/**
* Returns set element that is equal to the specified object.
* @param o
* @return
* @param o object
* @return set element that is equal to the input argument or null if no such set element exists
*/
public E get(Object o) {
return map.get(o);
......