add method
Adds item
to the map, extending the length by one.
This method accepts a String as a key
or an ItemSerializable, where its id is going to be used.
Implementation
void add(T item, {String? key}) {
_items[_getKey(key ?? item)] = item;
}