or u could try:
Object[] getObjects()
{
Object a[] = new Object[v.size()];
v.copyInto(a);
return a;
}
-----Original Message-----
From: steve barrett <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, March 03, 1999 2:59 PM
Subject: Re: <LOOP> on Enumeration
>in java 2 it would be something like
>
>....bean code for method that returns Object[]
>ArrayList al = new ArrayList();
>for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
> al.add(e.nextElement());
>}
>return al.toArray();
>
>
>---Archie Russell <[EMAIL PROTECTED]> wrote:
>>
>>
>> could just add to the gnu implementation. how would people want
>this to
>> work?
>>
>> On Wed, 3 Mar 1999, steve barrett wrote:
>>
>> > could write an enumeration to Object[] bean..
>> >
>> > ---Werner Hennrich <[EMAIL PROTECTED]> wrote:
>> > >
>> > > Hi,
>> > >
>> > > I may be blind, but...
>> > >
>> > > Is there really no way to have a <LOOP> work on an Enumeration
>> > > rather then on a mulivalued propperty ?
>> > >
>> > > An Enumeration works with the hasMoreElements() and nextElement()
>> > methods,
>> > > so the entire ResultSet doesn't have to be wrapped in an arry in
>> > advance.
>> > > For a lot of situations I would really prefer that scenario.
>> > >
>> > > I wonder why they haven't put that into JSP. Or is there a simple
>> > and cheap
>> > > way to achive the same via 'String[] getFoo()' or 'String
>> > getFoo(int)'? I
>> > > don't think so. Well, one could fake the Enumeration's iterative
>> > aproach
>> > > into 'String getFoo(int)' and check that 'int' is strictly
>> > incemented by 1
>> > > for every call, but who would consider this good design (since it
>> > pretends
>> > > to be a different thing and imposes an invisible restriction on
>the
>> > way it
>> > > can be used)?
>> > >
>> > > Thanks & bye
>> > > Werner
>> > >
>> > >
>> >
>===========================================================================
>> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in
>> > the body
>> > > of the message "signoff JSP-INTEREST". For general help, send
>email
>> > to
>> > > [EMAIL PROTECTED] and include in the body of the message
>"help".
>> > >
>> >
>> > _________________________________________________________
>> > DO YOU YAHOO!?
>> > Get your free @yahoo.com address at http://mail.yahoo.com
>> >
>> >
>===========================================================================
>> > To unsubscribe, send email to [EMAIL PROTECTED] and include in
>the body
>> > of the message "signoff JSP-INTEREST". For general help, send
>email to
>> > [EMAIL PROTECTED] and include in the body of the message "help".
>> >
>>
>
>_________________________________________________________
>DO YOU YAHOO!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JSP-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".