that's corect. so, a quick thing i've come up with is to make a class that holds 2 objects( named Pair for example) , and to use java.util.ArrayList, if he needs only to iterate through the list of pairs. anyway, the java.util package it's the starting point for searching a container.
Don't take life serious 'cause you'll never get out of it alive. ---------- Original Message ----------- From: Greg Gent <[EMAIL PROTECTED]> To: "JDJList" <[EMAIL PROTECTED]> Sent: Fri, 30 Aug 2002 09:56:55 -0400 Subject: [jdjlist] Re: Dealing with generic pairs of data > IIRC the issue with using a Map (of any kind) is that the keys > inserted must be unique values. The origianl poster didn't say > anything about the key values being unique as a requirement or not, > but... > > -----Original Message----- > From: Edward Moraru [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 30, 2002 7:35 AM > To: JDJList > Subject: [jdjlist] Re: Dealing with generic pairs of data > > u can use java.util.HashMap, that is storing dat in pairs( like (key, > value) ). if u will need some sorting, i would recommend to use java.util.TreeMap. > > Don't take life serious 'cause you'll never get out of it alive. > > ---------- Original Message ----------- > From: "Repine, Burt" <[EMAIL PROTECTED]> > To: "JDJList" <[EMAIL PROTECTED]> > Sent: Thu, 29 Aug 2002 12:08:19 -0700 > Subject: [jdjlist] Dealing with generic pairs of data > > > > I have a very simplistic requirement but a problem in trying to > determine > > > the best object to use to satisfy it. > > > I need to pass a collection of pairs of data between objects and want to > > > maintain the association between the pairs. > > > There is no order to the pairs. When extracting the data I merely want > to > > > iterate through whatever the object may be and pull out each pair of > data. > > > > > > The data would be represented something like the following and I have a > > > need to store null: > > > > > > String String > > > String String > > > String null > > > String null > > > String null > > > > > > I've been back and forth through various texts, the Sun API and fellow > > > employees without being able to decide upon the best scenario yet. > > > Any help would be appreciated. > > > > > > Thank you! > > > > > > > > > > To change your JDJList options, please visit: http://www.sys- > con.com/java/list.cfm > ------- End of Original Message ------- > > Counter Strike server > http://cs.idilis.ro > > To change your JDJList options, please visit: > http://www.sys-con.com/java/list.cfm > > To change your JDJList options, please visit: http://www.sys- con.com/java/list.cfm ------- End of Original Message ------- Counter Strike server http://cs.idilis.ro To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm
