operator []= method

void operator []=(
  1. EmailAddressKey key,
  2. EmailAddress? value
)

Implementation

operator []=(EmailAddressKey key, EmailAddress? value) {
  if (value == null) {
    this.InternalRemove(key);
  } else {
    if (this.Entries.containsKey(key)) {
      EmailAddressEntry entry = this.Entries[key]!;
      entry.EmailAddress = value;
      this.Changed();
    } else {
      EmailAddressEntry entry =
          new EmailAddressEntry.withKeyAndEmail(key, value);
      this.InternalAdd(entry);
    }
  }
}