Returns the inverted map. In the inverted map the values of the original map are the keys and the keys of the original map are the values. Duplicate values are removed. The obtained value is random, that means BidiMaps should only be used in cases where either the key and the value are unique.
inverse() | |||
---|---|---|---|
Argument | |||
Return value | BidiMap | BidiMap with exchanged key-value pairs |
Formula | Result |
---|---|
=BidiMap{Pair{'A',1}, Pair{'B',2}}.inverse | [1»A,2»B] |