• Post Reply Bookmark Topic Watch Topic
  • New Topic

Flattening a 2 dimensional table.  RSS feed

 
Annie McCall
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anyone out there know how to flatten a 2 dimensional arraylist?

Thanks!
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A hammer comes to mind.

Sorry. Seriously, what would you like it to look like afterwards? Or is that the question?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A two-dimentional table sounds pretty flat to me already.
 
Annie McCall
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to take a 2 dimensional and flatten it to a 1 dimensional.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I guess a "2 dimensional arraylist" is an arraylist of arraylists, is that what you mean? Perhaps you want something like this:

Does that help?
[ November 22, 2006: Message edited by: Jim Yingst ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!