Class Multimaps.CustomListMultimap<K,​V>

    • Field Detail

      • factory

        transient Supplier<? extends java.util.List<V>> factory
    • Constructor Detail

      • CustomListMultimap

        CustomListMultimap​(java.util.Map<K,​java.util.Collection<V>> map,
                           Supplier<? extends java.util.List<V>> factory)
    • Method Detail

      • createCollection

        protected java.util.List<V> createCollection()
        Description copied from class: AbstractMapBasedMultimap
        Creates the collection of values for a single key.

        Collections with weak, soft, or phantom references are not supported. Each call to createCollection should create a new instance.

        The returned collection class determines whether duplicate key-value pairs are allowed.

        Specified by:
        createCollection in class AbstractListMultimap<K,​V>
        Returns:
        an empty collection of values
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream stream)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream stream)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException