Generics or User defined Type safe Array List

G

Guest

Hi,

I want to have an array/arraylist of a user defined class. This class just
holds a number of queue collections.

For efficiency I want my arraylist/array to be type safe to avoid
boxing/unboxing.

I was wondering what is the best way to achieve this. I know my
arraylist/array will hold only one type of data(i.e. instances of my user
defined class).

Is it overkill to use generics for this and should i create my own type safe
arrayList/array or should I use Generics anyway?

Thanks
Macca
 
O

Otis Mukinfus

Hi,

I want to have an array/arraylist of a user defined class. This class just
holds a number of queue collections.

For efficiency I want my arraylist/array to be type safe to avoid
boxing/unboxing.

I was wondering what is the best way to achieve this. I know my
arraylist/array will hold only one type of data(i.e. instances of my user
defined class).

Is it overkill to use generics for this and should i create my own type safe
arrayList/array or should I use Generics anyway?

Thanks
Macca

I don't think it would be overkill at all to use generics. In fact it would be
much easier and faster than developing your own type safe collection.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top