Interface IMultiset<E>

  • Type Parameters:
    E - the element type of the multiset
    All Superinterfaces:
    java.util.Collection<E>, java.lang.Iterable<E>
    All Known Implementing Classes:
    AbstractMultiset, HashMultiset, LinkedHashMultiset

    public interface IMultiset<E>
    extends java.util.Collection<E>
    Set-like data structure where each element has a cardinality. The cardinality can be queried with count(). add() and remove() operations increase and decrease the cardinality, respectively. Tries to follow the java.util.Collection contract. Implements all optional collection operations. Note that iterator() and toArray() return each element just once, irrespective of its cardinality. Cardinality-aware iteration is possible with entrySet().
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int count​(E element)  
      java.util.Set<java.util.Map.Entry<E,​java.lang.Integer>> entrySet()  
      • Methods inherited from interface java.util.Collection

        add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Method Detail

      • count

        int count​(E element)
      • entrySet

        java.util.Set<java.util.Map.Entry<E,​java.lang.Integer>> entrySet()