Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有一种简单的方法可以将 List 转换为 MongoDBList(或 BasicDBList)?
scala> val list = List("foo", "bar") list: List[java.lang.String] = List(foo, bar) scala> val dbList = MongoDBList(list:_*) dbList: com.mongodb.casbah.commons.MongoDBList = [ "foo" , "bar"]
提示:总是首先阅读源代码。它可以为您的问题提供许多答案,顺便说一句,它将很有用。第一次可能很难,但后来变得越来越自然。