1 Reply Latest reply: Oct 14, 2010 4:34 PM by Asrivast-Oracle RSS

    compareTo implementation with Generics

      I have an interface like:
      public interface MyInterface<V extends Val<V>> extends Comparable<MyInterface<V>> {...}

      and implementation as:
      public class MyImp <V extends Val> implements MyInterface {
      // -- How should my compareTo look like if I use MyInterface instead of an Object?
      public int compareTo (Object o) {

      I want to use compareTo(MyInterface m) instead of compareTo (Object o).

      Thanks for the help.