Class HashMultiset<E>

    • Constructor Detail

      • HashMultiset

        private HashMultiset()
      • HashMultiset

        private HashMultiset​(int distinctElements)
    • Method Detail

      • create

        public static <E> HashMultiset<E> create()
        Creates a new, empty HashMultiset using the default initial capacity.
      • create

        public static <E> HashMultiset<E> create​(int distinctElements)
        Creates a new, empty HashMultiset with the specified expected number of distinct elements.
        Parameters:
        distinctElements - the expected number of distinct elements
        Throws:
        java.lang.IllegalArgumentException - if distinctElements is negative
      • create

        public static <E> HashMultiset<E> create​(java.lang.Iterable<? extends E> elements)
        Creates a new HashMultiset containing the specified elements.

        This implementation is highly efficient when elements is itself a Multiset.

        Parameters:
        elements - the elements that the multiset should contain
      • writeObject

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

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