Creates a Pair which key and/or value has been replaced.
Pair<K, V> replace({K? key, V? value}) => Pair(key ?? this.key, value ?? this.value);