I have a class ExtA which contains a filter function to filter an ArrayList:
public ExtA filt(...)
{
//code
}
when I compile i
You have to tell it, that T is a generic type in this case:
public ExtA filt(Func a)
You declared your interface with the symbol T
, but that symbol is only valid in the interface declaration itself. The T
you are using in your method is a different T
. You have to declare it again, since the method is not implemented inside the interface declaration.