On 10 August 2011 14:19, TreKing <treking...@gmail.com> wrote: > On Wed, Aug 10, 2011 at 7:19 AM, sktniran <sktniranjanad...@gmail.com> > wrote: >> >> is it there any way to retrive key from value in hashtable? > > Assuming the value is unique, walk the list by key until your find the value > you're looking for. Obviously, this is slow and not how a hashtable is meant > to be used.
Alternatively you could use Google collections and their BiMap<K,V>: http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/collect/BiMap.html ...or implement the class yourself, using 2 Hashtables, 1 for each retrieve direction Daniel -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en