Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8681
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Mon, 10 Oct 2011 11:31:47 -0500 |
| Date | Mon, 10 Oct 2011 09:31:41 -0700 |
| From | Patricia Shanahan <pats@acm.org> |
| User-Agent | Mozilla/5.0 (Windows NT 5.2; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? |
| References | <c534ac30-345e-4467-ba44-5d719d8c22ca@6g2000prh.googlegroups.com> <j6v5ha$e7s$1@dont-email.me> |
| In-Reply-To | <j6v5ha$e7s$1@dont-email.me> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <TI2dnXg8ofRugA7TnZ2dnUVZ_rydnZ2d@earthlink.com> (permalink) |
| Lines | 27 |
| X-Usenet-Provider | http://www.giganews.com |
| NNTP-Posting-Host | 70.230.200.54 |
| X-Trace | sv3-HwGO/7dzLBLdYG9XRPMB1bciPJsAOxJ41DSx2AiimLL7B5JULX2AGJTGvRv+wJUvUsRFbAqZSPnZrbV!8VAJ10lKKCL78pAnTXAAhmKB0i5dPDleQ9DrFQOMA8GtpbC/n0GOqZpRj0kSif/tfmnWA9LCyenZ!BR0fAoFeUK3q75L+7W3PHDA5D2PyrK3ayKjVhL/BfQVp3g== |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 2264 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8681 |
Show key headers only | View raw
On 10/10/2011 9:12 AM, markspace wrote:
> On 10/10/2011 8:01 AM, KevinSimonson wrote:
>> Can anyone tell me what's going on here? In {Wierd} itself is the
>> {Wierd} that's being extended in the angle brackets the same {Wierd}
>> that's being defined in this file?
>
>
> Yes. Extension, and polymorphism, just mean "type." Weird is a type of
> Weird, so it fulfills the bound that the type of T must be a type of
> Weird (extends Weird).
>
>
>> And what exactly is happening in
>> {main()} when I declare {wow} to be a {Wierd< Wierd>} object?
>
>
> Well, you didn't do anything with the type parameter T, so not a lot is
> happening. Try to find some existing classes that use type parameters,
> like the Collections classes, and ask that question for them.
>
>
java.lang.Class is also an interesting example. It is declared as
Class<T> where T is the type of the class modeled by the Class object.
Now think about the Class object for java.lang.Class. It is a Class<Class>.
Patricia
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
What Does it Mean to Pass a Generic Class Itself as a Parameter? KevinSimonson <kvnsmnsn@hotmail.com> - 2011-10-10 08:01 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 12:11 -0400
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 12:56 -0400
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? markspace <-@.> - 2011-10-10 09:12 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Patricia Shanahan <pats@acm.org> - 2011-10-10 09:31 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Lew <lewbloch@gmail.com> - 2011-10-10 12:12 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-10 13:32 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 16:40 -0400
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Lew <lewbloch@gmail.com> - 2011-10-10 14:29 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Screamin Lord Byron <scre@min.dot> - 2011-10-10 19:07 +0200
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-11 02:08 -0400
csiph-web