1 Reply Latest reply on Oct 14, 2010 9:34 PM by Asrivast-Oracle

    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.