can't accumulate category job slight an interface general list argument
just got doubt generics, since doesn't accumulate controlling general list? the possible, anyway around it? many conclude any answer.
// interface used serviceasync inteface.
public interface baseobject
{
open twine getid();
}
// category implements interface
public category _modeldto implements baseobject, isserializable
{
stable twine id;
open vacant setid(string id)
{
this.id = id;
}
open twine getid()
{
relapse id;
}
}
// interface used serviceasync inteface.
public interface myasync<t>
{
// zero here.
}
// use interface both interfaces above.
public interface serviceasync
{
open vacant getlist(myasync<list<? extends baseobject>> callback);
}
public category myclass
{
serviceasync use = (some implementation);
myasync<list<_modeldto>> callback = new myasync<list<_modeldto>>()
{
};
service.getlist(callback); // does compile, says arguments applicable????
}
Comments
Post a Comment