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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -