de.caff.generics

## Interface CountingSet<T>

- Type Parameters:
    `T` - set type
  All Superinterfaces:
    java.util.Collection<T>, java.lang.Iterable<T>, java.util.Set<T>
  All Known Implementing Classes:
    AbstractBasicCountingSet, CountingHashSet, CountingTreeSet

      public interface CountingSet<T>
      extends java.util.Set<T>

  A set which counts the number of additions.

  Because it would be breaking the set semantics removal is not allowed. All removal methods but `AbstractBasicCountingSet.clear()` therefore will throw an `UnsupportedOperationException`.

  Author:
    Rammi

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCount(T item)` Get the count how often any item was added.

    - ### Methods inherited from interface java.util.Set

      `add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, removeIf, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Method Detail

    - #### getCount

          int getCount(T item)

      Get the count how often any item was added.
      Parameters:
        `item` - item to look for
      Returns:
        add count or `0` if the item was never added (or the clear code has been used after its addition)