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) {
  Set<MapEntry<K, ISet<V>>> entriesWithValue = {};
  for (MapEntry<K, ISet<V>> entry in _mapOfSets.entries) {
    var set = entry.value;
    if (set.contains(value)) entriesWithValue.add(entry);
  }
  return entriesWithValue;
}