ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Making Java Objects Comparable
Subject:   Regarding sorting of objects
Date:   2006-11-28 23:26:24
From:   raoul.schmidiger
Response to: Regarding sorting of objects

Delegate the compareTo to Strings implementation:

public int compareTo(Object o) {
return this.getText().compareTo(o.getText());

Regards Raoul

1 to 1 of 1
1 to 1 of 1