[Mono-list] Multidimensional arrays -- How do I do this?

Kevin Francis kevin@arslinux.com
Mon, 14 Jun 2004 00:05:06 +0800


I am writing what is basically a feed compiler ala PlanetPlanet or 
Monologue. My problem has come about just as I reach the actual part 
where I compile feeds into one massive feed.

I actually thought to use a structure as follows:

Collective
    Entry
       Id
       Title
       Date
       ...
    Entry
       Id
       Title
       Date
       ...
    Entry
       Id
       Title
       Date
       ...
...

and so forth. The idea is to take these feeds, place them in an array 
and then sort by date.

In the only other languages I know, (php, C etc.) I'd use a 
multidimensional array, however I've run into problems uisng ArrayList, 
since it seems to be inherently single-dimensional, unless I embed/nest 
ArrayLists within it. That could well get sticky -- imagine something on 
the order of 1000 ArrayLists within Collective. I do realise that this 
sound suspiciousl like "I want my other language back!" but I've looked 
@ the book I have and ... I really can't come up with anything better. 
As it is it feels like a huge kludge.

Would this be a problem performance wise? Does anyone have suggestions 
on how to do it another way? I really am stuck. This ArrayList deal is 
very foreign in feel/thought flow.

Thanks and cheers.

-- 
Kevin Francis
<http://denial.loose-screws.com/>