I'm trying to create a new class by subclassing another generic class (with a bound) and implementing a generic interface (without a bound):
public class Foo1<T extends Bar> {
...
}
public interface Foo2<T> {
...
}
public class ProblemClass<T extends Bar, U>
extends Foo1<T extends Bar> implements Foo2<U> {
...
}
This gives me compile errors. I also tried:
public class ProblemClass<T, U>
extends Foo1<T extends Bar> implements Foo2<U> {
...
}
public class ProblemClass<T extends Bar, U>
extends Foo1<T> implements Foo2<U> {
...
}
But neither of these work either.
What's the correct syntax to define my subclass in a way that lets me keep the typing generic, letting me pass they types along to the superclass and interface? Is this even possible?
Thanks!