CountingHashSet<E> constructor

CountingHashSet<E>({
  1. bool equals(
    1. E,
    2. E
    )?,
  2. int hashCode(
    1. E
    )?,
  3. bool isValidKey(
    1. dynamic
    )?,
})

Equivalent to HashSet's main constructor.

Implementation

CountingHashSet({
  bool Function(E, E)? equals,
  int Function(E)? hashCode,
  bool Function(dynamic)? isValidKey,
})  : _inner = HashSet(
        equals: equals,
        hashCode: hashCode,
        isValidKey: isValidKey,
      ),
      _counts = HashMap(
        equals: equals,
        hashCode: hashCode,
      );