Re: Is there a way to use String[] as a Set??
- From: "Ingo R. Homann" <ihomann_spam@xxxxxx>
- Date: Fri, 30 Sep 2005 11:15:10 +0200
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
.
- Follow-Ups:
- Re: Is there a way to use String[] as a Set??
- From: Roedy Green
- 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??
- From: Roedy Green
- Re: Is there a way to use String[] as a Set??
- Prev by Date: Re: JAR, JNI and libraries
- Next by Date: Re: Is there a way to use String[] as a Set??
- 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):