How to make Generic Object in java implements an interface
- by ahmed elbagoury
I want to have a generic object that implements an interface.
I mean if i have a class A
Class A <E>{
E x;
}
I want to make sure that x will implement a particular interface(myInterface). In other words, that the type E implements an interface.