Re: Is there a way to use String[] as a Set??



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.
.