Sagewire Logo

Something a bit goofy about Generics

2 Message(s) by 2 Author(s) originally posted in java advocacy


From: Roedy Green Date:   Thursday, October 25, 2007
Iterable<? extends JAVAFileObject>

You'd think a JAVAFileObject[] or a JAVAFileObject...'d fullfil
that requirement, but it does not. It fills it sufficiently to do a
for:each but not to satisfy this parameter.

That is like a piece of purple lint on a white sweater.

People say arrays and generics do not mix, but they damn well SHOULD.
--
Roedy Green Canadian Mind Products
The JAVA Glossary
http://mindprod.com


From: The Ghost In The Machine Date:   Thursday, October 25, 2007
In comp.lang.JAVA.advocacy, Roedy Green
<see_website@xxxxxxxxxxx>
wrote in message
on Thu, 25 Oct 2007 14:27:03 GMT
<co91i3146rtqc07gr3die2jpqaedpmoeds@xxxxxxxxxxx>:
Iterable<? extends JAVAFileObject>
You'd think a JAVAFileObject[] or a JAVAFileObject...'d fullfil
that requirement, but it does not. It fills it sufficiently to do a
for:each but not to satisfy this parameter.
That is like a piece of purple lint on a white sweater.
People say arrays and generics do not mix, but they damn well SHOULD.



A workaround, of course, is passing in

Arrays.asList(p)

where p is JAVAFileObject[].

I agree that it's a blemish, though.

--
#191, ewill3@xxxxxxxxxxx
GNU and improved.

--
Posted via a free Usenet account from http://www.teranews.com



Next Message: i willl send the jobs related to JAVA ,will every body accept it.


Blogs related to Something a bit goofy about Generics

The First Kiss
Im pretty sure it was when I heard the ue sound of her name that I instantly felt something deep inside my chest, a ping right below the top of the rib cage, like an electric shock only it didnt hurt; it felt really goofy, ...

Classic Computer Jokes from various Sources on the Net
A properly designed light bulb object would inherit a change method from a generic light bulb class!" How many Java programmers does it take to change a light bulb? One, to generate a "ChangeLightBulb" event to the socket. ...

Setting Up Your First Server
Something that contains nice built-in functions like in_array() . If you’re an engineer, and reading this, the choice will undoubtedly be very obvious for you. You’ll use Java/PHP/Ruby/whatever is hot at the moment. ...

25 new messages in 16 topics - digest
You having a bit of reading comprehension difficulty Ray ? I would >>>simply refer you to my statement (4 paras above) where I said: >>> >>> "Since I've never seen a *DEFINITION* of *murder*, legal or lay, that >>> ^^^^^^^^^^^^ ...

25 new messages in 17 topics - digest
>java Factor 34587541 >> >> I wrote an instrumented version of my program and tried it with your >> inputs. It factored the target with 160 probes: >> >> target = 34587541 >> k = 30 >> >> trying n = 1, surrogate = 34589341 ...

25 new messages in 6 topics - digest
implemented an (admittedly goofy) speech-to-text transcriber function they call "VGist" to give you the "gist" of the message without having to playback the audio. So in the body of the message I might ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional