Class ImmutableMap.SerializedForm<K,V>

java.lang.Object
com.google.common.collect.ImmutableMap.SerializedForm<K,V>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ImmutableBiMap.SerializedForm, ImmutableSortedMap.SerializedForm
Enclosing class:
ImmutableMap<K,V>

static class ImmutableMap.SerializedForm<K,V> extends Object implements Serializable
Serialized type for all ImmutableMap instances. It captures the logical contents and they are reconstructed using public factory methods. This ensures that the implementation types remain as implementation details.
  • Field Details

    • USE_LEGACY_SERIALIZATION

      private static final boolean USE_LEGACY_SERIALIZATION
      See Also:
    • keys

      private final Object keys
    • values

      private final Object values
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
  • Constructor Details

  • Method Details

    • readResolve

      final Object readResolve()
    • legacyReadResolve

      final Object legacyReadResolve()
    • makeBuilder

      ImmutableMap.Builder<K,V> makeBuilder(int size)
      Returns a builder that builds the unserialized type. Subclasses should override this method.