home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!csus.edu!netcom.com!netcom!kenny
- From: kenny@netcom2.Netcom.COM (Ken Smith)
- Subject: Novice HashTable Question
- Message-ID: <KENNY.93Jan9142756@netcom2.Netcom.COM>
- Sender: kenny@netcom.com (Ken Smith)
- Organization: Netcom Online Communications Service
- Distribution: comp
- Date: Sat, 9 Jan 1993 22:27:56 GMT
- Lines: 23
-
- I want to use the HashTable class to implement a symbol table for a
- simple expression evaluator that I'm writing, however there seems to
- be one crucial feature missing from HashTable (or more likely I just
- can't figure it out).
-
- My question: Given a "value", how does one determine its associated
- "key" in a HashTable?
-
- When using hash tables that I've written in the past, I've found it
- useful (actually essential) to be able to quickly lookup a table entry
- given *either* its key or its value.
-
- In other words, how come there isn't a "keyForValue" method in addition
- to the existing "valueForKey" method?
-
- Thanks in advance,
- Ken Smith
- --
- _______________________________________________________________________
- kenny@netcom.com
- --
- _______________________________________________________________________
- kenny@netcom.com
-