In Java, co-variance for a generic can be defined as <? extends Clazz> and contra-variance can be defined as <? super Clazz>, but is it possible to define both of these traits at once? Take this case for example:
interface Foo{}
interface Fizz extends Foo{}
interface Buzz extends Foo{}
class Bar implements Fizz, Buzz{}
Is it possible to restrict the type to only Fizz and Buzz?
Something like <? extends Foo super Bar>
Disclaimer: I am not actually writing code like this
