Arraylists of objects.

Is it possible to have an arraylist or some other collection of objects in J2ME?

I need to loop through a list of enemies. I’m not making a game, I’m just evil and very organized :wink:

Theres no ArrayList in J2ME only Vector and it´s pretty expensive… :-/

Thanks. What kind of hit to my framerate can I expect? I suppose I could just test it.

Is there a J2ME API specification anywhere? I couldn’t find one.

At the JCP web site you can find the specs (including JavaDocs) for CLDC 1.0, CLDC 1.1, MIDP 1.0, MIDP 2.0, WMA 1.0/1.1, MMAPI 1.0/1.1 etc. You’ll need to combine the appropriate versions’ JavaDocs to get the full JavaDocs for the phone you’re targeting.

Alternatively, Sun’s J2ME Wireless Toolkit includes these JavaDocs in its docs/api directory.

Many thanks

If you want, I can send you my own implementation of vector that is much cheaper and faster than the default one. Just e-mail me at darcone@qiui.com.