Package org.spockframework.util
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()
-