我使用TreeBidiMap来自Apache的集合库.我想对这些值进行排序doubles.
我的方法是Collection使用以下方法检索一个值:
Collection coll = themap.values();
Run Code Online (Sandbox Code Playgroud)
这自然很好.
主要问题:我现在想知道如何转换/转换(不确定哪个是正确的)coll到一个List可以排序?
然后我打算遍历排序的List对象,该对象应按顺序从TreeBidiMap(themap)中使用themap.getKey(iterator.next())迭代器将在列表上的位置获取相应的键doubles.