I have this abstract class
public abstract class AbstractA<T extends Comparable<? super T>> {
protected T value;
}
and my class
public class A<T> extends AbstractA {
}
I want to use the compareTo
function in class a
But java gives me the error:
The method compareTo(capture#5-of ? super capture#4-of ?) in the type Comparable is not applicable for the arguments (Comparable)
the function looks like:
protected find(Comparable value){
if( this.value.compareto(value) == 0){
//
}
}
But the function should be Called with (T value)
How do I have to extend the abstract class?