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



Hi,

Roedy Green wrote:
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.

Note that this is not a java.util.ArrayList, but a java.util.Arrays$ArrayList!


Ciao,
Ingo

.