android - Overloaded Generics in Java -


is there way in java, c#?

public interface basefragmentpresenter<t> {     void init(t view); }  public interface basefragmentpresenter<t,v> {     void init(t view, v relativeview); } 

i'm not sure you're trying accomplish, looks want call 2 different interface methods, each named init, , each passed view(s) of sub-type. suit needs?

public interface basefragmentpresenter {     void init(view view);     void init(view view, view relativeview); } 

using view allow pass in view of type.


Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -