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

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -