public interface View{...
public interface Control<V extends View>{...
public class RemoteControl<C extends Control<V extends View>> implements Control<V>{...
gives me a "Syntax error on token "extends", , expected" on "V extends View" for the RemoteControl class.
I guess the following alternative was possible
public class RemoteControl<C extends Control<V>,V extends View> implements Control<V>
{...
Still I wonder if this cannot be done in a more implicit way since the latter would require a redundant declaration of the View. I.e.:
public class TVRemoteControl extends RemoteControl<TVControl,TvView> implements TVControl{...
vs
public class TVRemoteControl extends RemoteControl<TVControl> implements TVControl{...
Maybe I'm just stuck in a box again, but is it possible to get the "generic Generics" in a more elegant way
See Question&Answers more detail:os