Re: Is there a way to use String[] as a Set??
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Fri, 30 Sep 2005 09:07:29 GMT
On Fri, 30 Sep 2005 10:17:46 +0200, "Ingo R. Homann"
<ihomann_spam@xxxxxx> wrote or quoted :
>IIR the Sources correctly, it is a minimalist wrapping class that
>implements List. IIRC, even add() is not possible but throws an
>UnsupportedException.
I was curious what this minimalist class was called. Now I am more
puzzled than ever:
Here is the code for Arrays.asList
public static <T> List<T> asList(T... a) {
return new ArrayList<T>(a);
Which indicates you actually get a full blown ArrayList. But the odd
thing is I could find no ArrayList constructor to match. There is a
collection constructor but not an array constructor. Is there some
sort of boxing happening? Am I just not seeing the constructor for
some reason? I don't see it in the JavaDoc either.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.
- Follow-Ups:
- Re: Is there a way to use String[] as a Set??
- From: Ingo R. Homann
- Re: Is there a way to use String[] as a Set??
- References:
- Re: Is there a way to use String[] as a Set??
- From: Thomas Hawtin
- Re: Is there a way to use String[] as a Set??
- From: Ingo R. Homann
- Re: Is there a way to use String[] as a Set??
- Prev by Date: JAR, JNI and libraries
- Next by Date: Re: JAR, JNI and libraries
- Previous by thread: Re: Is there a way to use String[] as a Set??
- Next by thread: Re: Is there a way to use String[] as a Set??
- Index(es):