allEntriesWithValue method

Set<MapEntry<K, ISet<V>>> allEntriesWithValue(
  1. V value
)

Return any key:set entry where the value exists in the set. If that entry doesn't exist, return null.

Implementation

Set<MapEntry<K, ISet<V>>> allEntriesWithValue(V value) {
  final Set<MapEntry<K, ISet<V>>> entriesWithValue = {};
  for (final MapEntry<K, ISet<V>> entry in _mapOfSets.entries) {
    final set = entry.value;
    if (set.contains(value)) entriesWithValue.add(entry);
  }
  return entriesWithValue;
}