I am trying to create a new class by subclassing another common class (with binding) and implementing a common interface (without binding):
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 a compilation of 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 one nor the other is working.
What is the correct syntax for defining my subclass in a way that allows me to maintain typing, allowing me to pass their types along with the superclass and interface? Is it possible?
Thanks!
source share