BiMap<K, V>.of constructor
BiMap<K, V>.of (
- Map<
K, V> other
Creates bi-map from another map.
Implementation
factory BiMap.of(Map<K, V> other) {
if (other is BiMap<K, V>) {
return BiMap<K, V>._(
Map<K, V>.of(other._forward),
Map<V, K>.of(other._backward),
);
} else {
return BiMap<K, V>()..addAll(other);
}
}