collections - getting object from arraylist using equals method - java -


i have 2 list of objects. want compare both lists. have custom objects in these 2 lists. thought can override equals method , object array list - list.get(objectref) , should give required object based on equals method comparison. came know there no such support yet.

instead of looping through entrie list , finding it, there anyway give required object list single call. available in apache utils lib or external lib?

thanks in advance

you can use:

list.get(list.indexof(objectref)); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -