I have this method (using generics) :
public class ExtA<T>Ex<T> extends ArrayList
{
public<T> ExtA<T>Ex<T> filt(Function<T, Boolean> a...)
{
//code
}
}
giving me an "incompatible types error".
I have this method (using generics) :
public class ExtA<T>Ex<T> extends ArrayList
{
public<T> ExtA<T>Ex<T> filt(Function<T, Boolean> a...)
{
//code
}
}
giving me an "incompatible types error".
Remove the leading <T>
from your filt
method declaration. It's shadowing the generic T
type applied to the class.