List<List<String>> lst = ArrayList.....
Collections.sort(lst, (a, b) -> a.get(0).getSomeProp().compareTo(b..get(0).getSomeProp()));
Since the ArrayList
is generic, how does this compile with type erasure?
Does it compile as:
List lst = ....
Collections.sort(lst,
(a, b) -> ((String) ((List) a.get(0))).getSomeProp().compareTo(((String) ((List) a.get(0)))));