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.
我可以以某种方式定义 Trove 的TIntHashSet中元素的迭代顺序吗?
Set或者是允许定义元素迭代顺序的任何其他原语。我想以插入顺序或与用于构造集合的数组相同的顺序迭代元素。
Set
请参阅 java.util.LinkedHashMap,它保留插入顺序。