看板 [ java ]
討論串[問題] Generic sorting
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓2(2推 0噓 1→)留言3則,0人參與, 最新作者sbrhsieh (偶爾想擺爛一下)時間16年前 (2009/10/26 21:31), 編輯資訊
0
0
0
內容預覽:
實現什麼?. 要使用 Collections.sort method 來排序 List 內的 elements,只需要專注在. 設計一用以決定 element 相對關係(大小/順序)的 Comparator(假如 element 的. natural order 不適當時),不需要把 Vector
(還有81個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者legnaleurc (CA)時間16年前 (2009/10/26 20:49), 編輯資訊
0
0
1
內容預覽:
我需要用 Collections.sort() 去排序一個泛化的 Vector. 幾經嘗試之後. prototype 變成了 Vector< ? extends Comparable< ? super Object > >. 雖然我覺得有點怪怪的. 這樣 Comparable 不就只能接受 Obje
(還有71個字)
首頁
上一頁
1
下一頁
尾頁