Class LinkedHashMultiset<E>

All Implemented Interfaces:
Multiset<E>, Serializable, Iterable<E>, Collection<E>

public final class LinkedHashMultiset<E> extends AbstractMapBasedMultiset<E>
A Multiset implementation with predictable iteration order. Its iterator orders elements according to when the first occurrence of the element was added. When the multiset contains multiple instances of an element, those instances are consecutive in the iteration order. If all occurrences of an element are removed, after which that element is added to the multiset, the element will appear at the end of the iteration.

See the Guava User Guide article on Multiset.

Since:
2.0
See Also:
  • Field Details

  • Constructor Details

    • LinkedHashMultiset

      private LinkedHashMultiset()
    • LinkedHashMultiset

      private LinkedHashMultiset(int distinctElements)
  • Method Details