I'm currently using DiffUtil/AsyncListDiffer with a List collection. I'm using the general adapter/recyclerview/ViewHolder implementation. Items are a List<Uri>.
Can I use a LinkedHashSet instead of a List? Also, if yes, is it a major change?
I'm currently using DiffUtil/AsyncListDiffer with a List collection. I'm using the general adapter/recyclerview/ViewHolder implementation. Items are a List<Uri>.
Can I use a LinkedHashSet instead of a List? Also, if yes, is it a major change?
Copyright © 2021 Jogjafile Inc.
No
LinkedHashSetimplements theSetinterface, not theListinterface.Both
SetandListhave a common parentCollectioninterface, howeverListis the hardcoded interface type forDiffUtilandAsyncListDiffer. You would have to create custom implementations for data structures other than theList<T>interface.Collection/Map cheatsheet :