You can do it like this:
> public interface MyInterface
> {
[quoted text clipped - 11 lines]
> public String bar(Object arg);
> }
This way you have a common interface with no abstract methods
specified.
Hope this helps.
Best regards,
Eelco
Mize-ze - 13 Nov 2006 12:03 GMT
Thanks Eelco,
I Guess that will work but what the point of doing it?
> You can do it like this:
>
[quoted text clipped - 21 lines]
> Best regards,
> Eelco
Mark Jeffcoat - 13 Nov 2006 15:08 GMT
> Thanks Eelco,
> I Guess that will work but what the point of doing it?
Please don't top post.
You have to tell us what the point of doing it is if
you want a useful answer.
Pending that, you may have set up a situation that Java's
type system doesn't handle particularly gracefully, and
you'll have to define the interface's methods to accept
and return Object. Most of the time I see that, though,
there's a better way--more idiomatic, at least.

Signature
Mark Jeffcoat
Austin, TX
Hi,
> An example of what I want will make it clearer:
>
[quoted text clipped - 15 lines]
> public String bar(Object arg);
> }
Whats wrong with:
public interface MyInterface<FooParam,FooReturn,BarParam,BarReturn> {
public FooReturn foo(FooParam arg);
public BarReturn bar(BarParam arg);
}
public classA implements MyInterface<String,String,String,String>
{
public String foo(String arg){...}
public String bar(String arg){...}
}
public classB implements MyInterface<Object,Integer,Object,String>
{
public Integer foo(Object arg){...}
public String bar(Object arg){...}
}
Ciao,
Ingo
Mize-ze - 16 Nov 2006 13:02 GMT
Ingo,
Excactly what I wanted
Thanks
> Hi,
>
[quoted text clipped - 39 lines]
> Ciao,
> Ingo