Java - multiple signature using generic? -


public interface factory<t> {     t create(); }  public interface factory<t,p> {     t create(p... data); } 

is there way define interface can use name factory both type, or have use factorywithparam?

is there reason can't join 2 interfaces one?

public interface factory<t,p> {     t create();     t create(p... data); } 

but if can't there's no way can have 2 different interfaces same name in same package. can put them in different packages i'd advise against it, confuse hell out of whoever maintain code.


Comments

Popular posts from this blog

c# - BasicHttpBinding equivalent CustomBinding using WCF Client and PHP WebService -

android - Cannot use ndk-build on Cygwin -

sql server - python to mssql encoding problem -