T- set type
public interface CountingSet<T> extends java.util.Set<T>
Because it would be breaking the set semantics removal is not allowed.
All removal methods but
therefore will throw an
|Modifier and Type||Method and Description|
Get the count how often any item was added.
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray
int getCount(T item)
item- item to look for
0if the item was never added (or the clear code has been used after its addition)