Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #27768
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2014-03-16 17:04 -0700 |
| References | <6f84734b-69d5-471c-b041-8d37dd5657e5@googlegroups.com> <lfnjq6$t9m$1@dont-email.me> |
| Message-ID | <2fce5555-a057-4046-8fb1-de43d7175ece@googlegroups.com> (permalink) |
| Subject | Re: Parameterized collection catch-22 |
| From | zapanaz_googlegroups@hotmail.com |
On Tuesday, March 11, 2014 11:14:27 AM UTC-7, markspace wrote:
>
> public <A extends AddressInfo> void mergeAddressInfo( List<A> a,
>
> List<A> b )
>
> {...
>
>
>
> Now the compiler knows that a and b are of the same type. It will
>
> enforce that when you call the method (give you an error) and it will
>
> allow operations that make sense for lists of the same type.
>
Ah thanks very much. I should have known that.
They added generics to Java after I learned it, I still don't think of them.
>
>
> (Not compiled or tested.)
>
it's OK, I see what you're saying
--
Joe Cosby
Agent 99: Max, that knife missed you by inches.
Maxwell Smart: You think it's some kind of warning?
:: Currently listening to All My Life, 1972, by Uriah Heep, from "Demons and Wizards"
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Parameterized collection catch-22 zapanaz_googlegroups@hotmail.com - 2014-03-11 09:36 -0700
Re: Parameterized collection catch-22 markspace <markspace@nospam.nospam> - 2014-03-11 11:14 -0700
Re: Parameterized collection catch-22 zapanaz_googlegroups@hotmail.com - 2014-03-16 17:04 -0700
Re: Parameterized collection catch-22 Lew <lewbloch@gmail.com> - 2014-03-22 15:42 -0700
Re: Parameterized collection catch-22 zapanaz_googlegroups@hotmail.com - 2014-03-23 16:35 -0700
Re: Parameterized collection catch-22 Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2014-03-12 09:51 -0700
Re: Parameterized collection catch-22 zapanaz_googlegroups@hotmail.com - 2014-03-16 17:06 -0700
csiph-web