Put certain elements of an arraylist of arrays into a hashset
807591Jun 9 2008 — edited Jun 9 2008I have an arraylist of arrays. I now need to create a separate list that contains unique combinations of only 3 values contained in the underlying array in the arraylist. I think I can use a HashSet. I am just not sure how to create the HashSet?
I could create an ArrayList of just those 3 values and then use the add method but again I'm not sure how to create the ArrayList based on sub-elements of the original ArrayList. (i.e. copy three "variables" from the array in the arraylist to the new array for each member of the arraylist.)
Any help would be greatly appreciated.