1,LinkedHashSet 有序链式集合
举例:
- long startTime=System.currentTimeMillis();
- LinkedHashSet oprTypeSet = new LinkedHashSet();
- for(String it : arr) {
- oprTypeSet.add(it);
- }
- Iterator it=oprTypeSet.iterator();
- while(it.hasNext()) {
- System.out.println((String)it.next());
- }
- long endTime=System.currentTimeMillis();
- System.out.println("cost---:"+(endTime1-startTime1));
来源: http://www.bubuko.com/infodetail-2666361.html