Class ImmutableListDeserializer
java.lang.Object
com.github.natche.gravatarjavaclient.profile.gson.BaseCollectionDeserializer<com.google.common.collect.ImmutableList<?>>
com.github.natche.gravatarjavaclient.profile.gson.ImmutableListDeserializer
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<com.google.common.collect.ImmutableList<?>>
public final class ImmutableListDeserializer
extends BaseCollectionDeserializer<com.google.common.collect.ImmutableList<?>>
A collection deserializer for
Gson to use when deserializing
a Collection into an ImmutableList from Guava.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.common.collect.ImmutableList<?> buildFrom(Collection<?> collection) Deserializes a collection into anImmutableList.Methods inherited from class com.github.natche.gravatarjavaclient.profile.gson.BaseCollectionDeserializer
deserialize
-
Constructor Details
-
ImmutableListDeserializer
public ImmutableListDeserializer()
-
-
Method Details
-
buildFrom
Deserializes a collection into anImmutableList.- Specified by:
buildFromin classBaseCollectionDeserializer<com.google.common.collect.ImmutableList<?>>- Parameters:
collection- the collection to deserialize.- Returns:
- a new ImmutableList containing the elements of the provided collection
-