根据the docs http://www.scala-lang.org/api/current/index.html#scala.collection.mutable.LinkedList, scala.collection.mutable.LinkedList
自 2.11 版本起已弃用。不幸的是我没有找到任何可以替代它的东西。我需要一个可以从中删除项目的有序集合any常数时间内的索引。
我应该用什么?
使用 MutableList 及其迭代器remove
方法。它们提供 O(1) 的移除能力。
http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#linked_lists http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#linked_lists
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)