public void removeDuplicates (ArrayList<ArrayList<String>> strings) {
Set<ArrayList<String>> s = new LinkedHashSet<ArrayList<String>>(strings);
strings = new ArrayList<ArrayList<String>>(s);
}
i want to remove duplicated lines in ArrayList<ArrayList<String>>
, I want to use LinkedHashSet
and compare ArrayList
between themselves and if is the same not insert it. i know i need Comparator
but i do not know how to implement it for comparing ArrayList
inside ArrayList
.
Thx