What is the equivalent in Java for this C# declaration ?
public class AsyncThreadPool<T, K> where T : IAsyncThread<K> {
and IAsyncThread
is an interface
public interface IAsyncThread<T>
{
T GetAsyncUsedObject();
void StartAsyncRequest();
}
I have tried :
public class AsyncThreadPool<T extends IAsyncThread<K>, K >
But is not correct, as T implements IAsyncThread<K>
not extends it.
And I need in this class to use T.StartAsyncRequest()
or similar
In C# it is:
T asyncThread = default(T);
asyncThread.StartAsyncRequest()