Is there such a thing as bidirectional maps in Scala?

后端 未结 2 1561
失恋的感觉
失恋的感觉 2021-02-12 09:50

I\'d like to link 2 columns of unique identifiers and be able to get a first column value by a second column value as well as a second column value by a first column value. Some

2条回答
  •  误落风尘
    2021-02-12 10:32

    Guava has a bimap that you can use along with

    import scala.collection.JavaConversions._
    

提交回复
热议问题