Class ImmutableMap.SerializedForm<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    ImmutableBiMap.SerializedForm, ImmutableSortedMap.SerializedForm
    Enclosing class:
    ImmutableMap<K,​V>

    static class ImmutableMap.SerializedForm<K,​V>
    extends java.lang.Object
    implements java.io.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 Detail

      • USE_LEGACY_SERIALIZATION

        private static final boolean USE_LEGACY_SERIALIZATION
        See Also:
        Constant Field Values
      • keys

        private final java.lang.Object keys
      • values

        private final java.lang.Object values
    • Constructor Detail

    • Method Detail

      • readResolve

        final java.lang.Object readResolve()
      • legacyReadResolve

        final java.lang.Object legacyReadResolve()
      • makeBuilder

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