Re: TableSorter.java v2.1



ouroborus wrote:
As part of another project, I spent some time updating TableSorter.java so that it compiles cleanly under Java 1.5. The file can be retrieved from:

http://ouroborus.org/java/

I would appreciate any constructive comments regarding the results.

Why use reflcection to search for a method 'compareTo' when you could use instanceOf?
.



Relevant Pages

  • Re: Is instanceof dirty?
    ... > you want to switch on type information. ... when instanceof is unavoidable. ... extend an existing class structure with the visitor pattern. ... in Java, is multi-methods like those found in Nice, ...
    (comp.lang.java.programmer)
  • Re: Is instanceof dirty?
    ... >>The one place where I find myself frequently using instanceof in Java is ... > anything specifically odd about the Java equals() method. ... > avoids the potential problem, or at least ambiguity, with subclasses). ...
    (comp.lang.java.programmer)
  • Re: primitive wrapper classes
    ... processes the argument differently depending on its actual ... divided up by `instanceof' tests or equivalents. ... to enumerate all subclasses of Number. ... succeeding Java versions. ...
    (comp.lang.java.programmer)
  • Re: String1 <, <=, >, >=, String2
    ... KC Wong wrote: ... See the Java docs to see if what it ... compareTo() does it. ...
    (comp.lang.java.help)
  • Re: Interfaces Question - I am missing something
    ... The docs I read said it took a String str, but what if I had numbers? ... compareTo method lives somewhere and has a whole lot of code in it, ... Google for "java se 6" will almost always give you the most recent Java docs. ...
    (comp.lang.java.programmer)