Class Multimaps2


  • public class Multimaps2
    extends java.lang.Object
    Provides static creating a LinkedHashListMultimap.
    See Also:
    Multimaps
    • Constructor Summary

      Constructors 
      Constructor Description
      Multimaps2()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <K,​V>
      com.google.common.collect.ListMultimap<K,​V>
      newLinkedHashListMultimap()
      Creates a new, empty ListMultimap with the default initial capacities that uses a linked map internally.
      static <K,​V>
      com.google.common.collect.ListMultimap<K,​V>
      newLinkedHashListMultimap​(int expectedKeys, int expectedValuesPerKey)
      Constructs an empty ListMultimap with enough capacity to hold the specified numbers of keys and values without resizing.
      static <K,​V>
      com.google.common.collect.ListMultimap<K,​V>
      newLinkedHashListMultimap​(com.google.common.collect.Multimap<K,​V> multimap)
      Constructs an ArrayListMultimap with the same mappings as the specified multimap.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Multimaps2

        public Multimaps2()
    • Method Detail

      • newLinkedHashListMultimap

        public static <K,​V> com.google.common.collect.ListMultimap<K,​V> newLinkedHashListMultimap()
        Creates a new, empty ListMultimap with the default initial capacities that uses a linked map internally.
      • newLinkedHashListMultimap

        public static <K,​V> com.google.common.collect.ListMultimap<K,​V> newLinkedHashListMultimap​(int expectedKeys,
                                                                                                              int expectedValuesPerKey)
        Constructs an empty ListMultimap with enough capacity to hold the specified numbers of keys and values without resizing. It uses a linked map internally.
        Parameters:
        expectedKeys - the expected number of distinct keys
        expectedValuesPerKey - the expected average number of values per key
        Throws:
        java.lang.IllegalArgumentException - if expectedKeys or expectedValuesPerKey is negative
      • newLinkedHashListMultimap

        public static <K,​V> com.google.common.collect.ListMultimap<K,​V> newLinkedHashListMultimap​(com.google.common.collect.Multimap<K,​V> multimap)
        Constructs an ArrayListMultimap with the same mappings as the specified multimap. It uses a linked map internally..
        Parameters:
        multimap - the multimap whose contents are copied to this multimap