java - How to make a new list with a property of an object which is in another list - Stack Overflow
ists.transform(studentList, StudentToId.INSTANCE);
Surely it will loop in order to extract all ids, but remember guava methods returns view and Function will only be applied when you try to iterate over the List<Integer>
If you don't iterate, it will never apply the loop.
Read full article from java - How to make a new list with a property of an object which is in another list - Stack Overflow
No comments:
Post a Comment