| Author |
how to sort out elements in vector objects
|
senthil sen
Ranch Hand
Joined: Oct 10, 2002
Posts: 182
|
|
|
how to sort out elements in vector objects?
|
 |
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
|
|
Look at Collections.sort(). If the elements implement Comparable then you can just do this: If not then you can provide a Comparator like this:
|
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
|
 |
 |
|
|
subject: how to sort out elements in vector objects
|
|
|