Is there such a thing as bidirectional maps in Scala?

后端 未结 3 985
栀梦
栀梦 2021-02-12 10:11

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

3条回答
  •  后悔当初
    2021-02-12 10:48

    Guava has a bimap that you can use along with

    import scala.collection.JavaConversions._
    

提交回复
热议问题