I have an abstract class A such that it contains a method sort which clashes with the sort method in java.util.List
public abstract class A<T> extends AbstractList<T> implements
RandomAccess {
//bunch of stuff
public void sort(final Comparator<T> comparator) {
java.util.Collections.sort(this, comparator);
}
}
I read all the linked answers on generics type erasure and I do know that why they have the same name clash. However, I don't want to just change the name of my method to get rid of this error. Since class A extends AbstractList which in turn implements List, somehow the solution given in the linked questions are unable to help me to get through this situation.
P.S. I am well aware that this is a redundant/duplicate question, however, it may address a situation which may or may not exist and is no doubt dependent on my novelty of the concept. I was unable to find a SO question which deals with such a situation.
List of questions: