PDA

View Full Version : Map values are sets of strings - need them in an array


Nyktos
03-16-2010, 12:24 AM
Hi All,

I have a map that has Strings as the keys, and sets of strings as the values. I need to pull the sets of values off into an array, so I have;

1 - "String set 1"
2 - "String set 2"
3 - etc

I've tried a few things but I always seem to pull a single string, contaning all the sets, and this sits on index 1 of my set I export to.

How can I pull the values off onto an Array - each string set having a seperate index?

Much appreciation for the help!

Old Pedant
03-16-2010, 01:17 AM
Are you and taichibandit doing the same homework assignment?

http://www.codingforums.com/showthread.php?t=191502

???

I don't think I'd have written so complete an answer if I'd realizd it's homework.

Nyktos
03-16-2010, 01:30 AM
lol :D

I see what you mean, but mine's for work - we get lists of work received by suppliers, and we're going to compare this to the work we've sent them to reconcile what's missing.

Just trying to get the data in a workable format before I start manipulating it. I've read your response to the other guy which should help out.

Thanks :thumbsup:

Old Pedant
03-16-2010, 01:46 AM
Okay. I find it strange that you would do this in Java code instead of using a SQL query or two. I would think you would have the work you have sent them in a DB table, so I'd just add their responses to another (possibly temp?) table and then do some nice easy SQL.