This is my first time working with generics, so I'm a little unfamiliar with the terminology. Anyway, supposing I'm creating my own implementation of AbstractList:
class MyList<T> extends AbstractList<T>
And I've got the following three classes that I cannot change:
class TestNumber class One extends TestNumber class Two extends TestNumber class Three extends TestNumber // etc... Is it possible to change the type parameter for MyList to allow only types One and Two, but not other classes that inherit from TestNumber?