I want to make a generic class of this form:
class MyGenericClass {}
Problem is, I want to be acceptable for T to b
No, there's nothing in Java generics to allow this. You might want to consider having a non-generic interface, implemented by FooIntegerImpl and FooLongImpl. It's hard to say without knowing more about what you're trying to achieve.
FooIntegerImpl
FooLongImpl