Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Most efficient way of implementing this?

Name: Anonymous 2010-11-06 12:21

Simple situation really. Just being a bit paranoid I guess.

I have a 2D grid full of objects which I need to represent in source.

The grid contains two objects, object 1 and object 2 which both are children of object 3 which is abstract.
 
Now the thing is I can either:
1. Create an ArrayList<ArrayList> list object. ArrayLists don't care what you store in them so this would work. However it's kind of a hack since I don't really need a re sizable list with all the shit and giggles.

2. Create a packer object. That stores both of objects 1 and object 2 without problems and store then Packer[][] grid = new Packer(); .

So what does /prog/'s wisdom have to say about this? 1, 2 or some new brilliant idea?

Name: sussman -| XARN 2010-11-06 14:55

Rolf I'm actually surprised. Not a single post off topic. Way to go /prog/!

Anyway it was just a misunderstanding. I did the same thing some weeks ago and forgot to typecast and thought it was actually not legit to create an array of abstract objects. Anyway thanks!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List