Package de.javakaffee.kryoserializers
Class SubListSerializers.ArrayListSubListSerializer
- java.lang.Object
-
- com.esotericsoftware.kryo.Serializer<List<?>>
-
- de.javakaffee.kryoserializers.SubListSerializers.ArrayListSubListSerializer
-
- Enclosing class:
- SubListSerializers
public static class SubListSerializers.ArrayListSubListSerializer extends com.esotericsoftware.kryo.Serializer<List<?>>
Supports sublists created viaArrayList.subList(int, int)since java7 (oracle jdk, represented byjava.util.ArrayList$SubList).
-
-
Field Summary
Fields Modifier and Type Field Description static Class<?>SUBLIST_CLASS
-
Constructor Summary
Constructors Constructor Description ArrayListSubListSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.esotericsoftware.kryo.KryoaddDefaultSerializer(com.esotericsoftware.kryo.Kryo kryo)static booleancanSerialize(Class<?> type)Can be used to determine, if the given type can be handled by this serializer.List<?>copy(com.esotericsoftware.kryo.Kryo kryo, List<?> original)List<?>read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends List<?>> clazz)voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, List<?> obj)
-
-
-
Field Detail
-
SUBLIST_CLASS
public static final Class<?> SUBLIST_CLASS
-
-
Method Detail
-
canSerialize
public static boolean canSerialize(Class<?> type)
Can be used to determine, if the given type can be handled by this serializer.- Parameters:
type- the class to check.- Returns:
trueif the given class can be serialized/deserialized by this serializer.
-
addDefaultSerializer
public static com.esotericsoftware.kryo.Kryo addDefaultSerializer(com.esotericsoftware.kryo.Kryo kryo)
-
read
public List<?> read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends List<?>> clazz)
- Specified by:
readin classcom.esotericsoftware.kryo.Serializer<List<?>>
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, List<?> obj)- Specified by:
writein classcom.esotericsoftware.kryo.Serializer<List<?>>
-
-