Class HashMultiSet<T>

All Implemented Interfaces:
Iterable<T>, Collection<T>, MultiSet<T>, HTMLToString
Direct Known Subclasses:
LinkedHashMultiSet

public class HashMultiSet<T> extends AbstractMultiSet<T,Map<T,Integer>>
  • Constructor Details

    • HashMultiSet

      public HashMultiSet(Collection<? extends T> collection)
      Constructs a new multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection.
      Parameters:
      collection - Representing the objects that should be put in a multiset
    • HashMultiSet

      public HashMultiSet(T[] collection)
      Constructs a new multiset, such that all elements of the given collection are added as many times as they are in the given array.
      Parameters:
      collection - Representing the objects that should be put in a multiset
    • HashMultiSet

      public HashMultiSet()
      Constructs a new, empty multiset, such that all elements of the given collection are added as many times as they are returned by the iterator of that collection.