447383 (2) [Avatar] Offline
#1
Is there any good reason not to change the return type of get(K key) from Result <MapEntry<K,V>> to Result<V>?
Pierre-Yves Saumont (121) [Avatar] Offline
#2
Yes. If you get the Entry, you can get the key and/or the value from it. If you get only the value, the key is lost. If you need it later, you have to store it somewhere. As you don't know what the caller needs, it is best to offer more possibilities.
447383 (2) [Avatar] Offline
#3
Thanks.