Did a bunch of searching but came up blank. I'm using GreenDao within my app and am querying my database in a specific method which results in a list. I'd like to convert that list to a copyonwritearrayset. Is there a simple way to do this that I'm just not seeing?
At this point the only thing I can think to do is go item by item in a for loop:
List<Item> list = mItemDao.queryBuilder().orderDesc(ItemDao.Properties._id)
.list();
CopyOnWriteArraySet<Item> set = new CopyOnWriteArraySet<Item>();
for (Item item : list) {
set.add(item);
}
return set;