Removes the mapping for a key from this map if it is present (optional operation).

        Unlike remove(object), this operation does not return the removed value, which avoids the serialization cost of
        the returned value. If the removed value will not be used, a delete operation is preferred over a remove
        operation for better performance.

        The map will not contain a mapping for the specified key once the call returns.

        **Warning:
        This method breaks the contract of EntryListener. When an entry is removed by delete(), it fires an EntryEvent
        with a** ``None`` **oldValue. Also, a listener with predicates will have** ``None`` **values, so only the keys can be queried
        via predicates.**

        :param key: (object), key of the mapping to be deleted.

def delete(self, key):
        """
        Removes the mapping for a key from this map if it is present (optional operation).

        Unlike remove(object), this operation does not return the removed value, which avoids the serialization cost of
        the returned value. If the removed value will not be used, a delete operation is preferred over a remove
        operation for better performance.

        The map will not contain a mapping for the specified key once the call returns.

        **Warning:
        This method breaks the contract of EntryListener. When an entry is removed by delete(), it fires an EntryEvent
        with a** ``None`` **oldValue. Also, a listener with predicates will have** ``None`` **values, so only the keys can be queried
        via predicates.**

        :param key: (object), key of the mapping to be deleted.
        """
        check_not_none(key, "key can't be None")
        key_data = self._to_data(key)
        return self._delete_internal(key_data)