Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Re: Can this ca...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 18 of 24 Topic 16045 of 16078
Post > Topic >>

Re: Can this callback mechanism be generified?

by Mark Space <markspace@[EMAIL PROTECTED] > May 5, 2008 at 09:23 PM

Casper Bang wrote:
> Mark Space wrote:
>> In fact that might be the first thing I do in a real program, make a 
>> new object that is also it's own callback.  No sense in proliferating 
>> objects.
>>
>> public class EmployeeInfo
>>     implements Serializable,
>>                Cloneable,
>>                CallBack<EmployeeInfo>,
>>                Compareable<EmployeeInfo>
>> {
> 
> Right, that use case should be covered. It's rarely practiced in my 
> experiences), because often you need to implement an interface more than

> once, which of course you can't - in spite of having apparent different 
> signatures which dispatches to two distinct callback methods:
> 
> public class Formatter implements Callback<Date>, Callback<String>
> ...
> Error: Repeated interface
> 
> /Casper

That's not what I meant.  Unless I'm totally confused here, you look for 
interface[0].  Which may or may not be the Callback interface.  It could 
be some other interface at index 0.

Now maybe you know this and were just doing as you say a quick mock up, 
but I wanted to be clear.

Two parameterized interfaces of the same type aren't possible of course, 
since erasure means that you've declared the same interface twice. 
That's totally not what I show above, but again maybe you're already 
ahead of me here.




 24 Posts in Topic:
Can this callback mechanism be generified?
Casper Bang <casper@[E  2008-05-02 04:51:44 
Re: Can this callback mechanism be generified?
Mark Space <markspace@  2008-05-02 04:21:23 
Re: Can this callback mechanism be generified?
Casper Bang <casper@[E  2008-05-02 13:14:16 
Re: Can this callback mechanism be generified?
Daniel Pitts <newsgrou  2008-05-02 08:34:23 
Re: Can this callback mechanism be generified?
Casper Bang <casper@[E  2008-05-02 19:58:28 
Re: Can this callback mechanism be generified?
Casper Bang <casper@[E  2008-05-02 20:58:55 
Re: Can this callback mechanism be generified?
Mark Space <markspace@  2008-05-02 13:33:23 
Re: Can this callback mechanism be generified?
Joshua Cranmer <Pidgeo  2008-05-02 20:59:06 
Re: Can this callback mechanism be generified?
Mark Space <markspace@  2008-05-03 23:33:40 
Re: Can this callback mechanism be generified?
Daniel Pitts <newsgrou  2008-05-02 14:14:03 
Re: Can this callback mechanism be generified?
Casper Bang <casper@[E  2008-05-03 03:45:00 
Re: Can this callback mechanism be generified?
Mark Space <markspace@  2008-05-03 23:27:15 
Re: Can this callback mechanism be generified?
Casper Bang <casper@[E  2008-05-05 04:01:44 
Re: Can this callback mechanism be generified?
Daniel Pitts <newsgrou  2008-05-04 20:24:40 
Re: Can this callback mechanism be generified?
Mark Space <markspace@  2008-05-05 04:06:24 
Re: Can this callback mechanism be generified?
Casper Bang <casper@[E  2008-05-05 20:54:51 
Re: Can this callback mechanism be generified?
Lew <lew@[EMAIL PROTEC  2008-05-05 21:09:20 
Re: Can this callback mechanism be generified?
Mark Space <markspace@  2008-05-05 21:23:44 
Re: Can this callback mechanism be generified?
Casper Bang <casper@[E  2008-05-05 20:36:28 
Re: Can this callback mechanism be generified?
Lew <lew@[EMAIL PROTEC  2008-05-05 21:16:23 
Re: Can this callback mechanism be generified?
Daniel Pitts <newsgrou  2008-05-06 10:25:33 
Re: Can this callback mechanism be generified?
Lew <lew@[EMAIL PROTEC  2008-05-06 18:56:19 
Re: Can this callback mechanism be generified?
Daniel Pitts <newsgrou  2008-05-06 15:58:21 
Re: Can this callback mechanism be generified?
thufir <hawat.thufir@[  2008-05-02 21:05:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 7:03:15 CDT 2008.