|
Working with ArrayLists
Ok, my problem is this:
Currently i have a arraylist of beans say:
ArrayList list; <-- a list of ItemBean
ItemBean has attributes: PK and Qty.
Given another arraylist of Strings say String[] pK; , i want to look inside the ArrayList list for all element whose ItemBean.getPK() equals each elements of pK. If a match is found then, i would store each ItemBean.getQty() into another Arraylist listQty.
Can you help me with a fast and not so space consuming algorithm?
Thanks in advance.
|