# contains method

1. @override

bool contains(

1. Object? element

)
override

Whether `value` is in the set.

    final characters = <String>{'A', 'B', 'C'};
    final containsB = characters.contains('B'); // true
    final containsD = characters.contains('D'); // false

## Implementation

    @override
    bool contains(Object? element) {
      if (isEmpty) return false;

      final index = _getBucketIndex(element);
      final bucket = _buckets[index];

      if (bucket != null) {
        for (final existingElement in bucket) {
          if (existingElement == element) {
            return true;
          }
        }
      }
      return false;
    }