Also you can 1 - redefine the equals method on your object. 2 - use java.util.Collections and a comparator.
In both cases you meed to pass an instance of your object with, at least, the string attribute setted. On Aug 28, 2011 12:12 PM, "blake" <[email protected]> wrote: > Use a Map. See java.util.Map and java.util.HashMap > > -blake > > On Aug 28, 6:59 am, Boozel <[email protected]> wrote: >> Hi >> >> I have a list of objects and i need to search through it to find a specific >> object. >> The objects have a String name property and i want to find an object with >> the same name as my query string. >> >> Is there anyway yo do this using the indexOf method or do i need to create >> my own using a for loop. >> Thanks > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

