Closed eneim closed 7 years ago
@konifar Just a bit unclear, but it is not a fatal issue. The point is: why we need it to be iterator :p. Nothing special here. (A miss-use of it can be trouble, but it is rare).
Sorry, I don't remember why I implemented iterator
🙇
But as you said, it looks unnecessary now.
This is improved by @shiraji ! Thanks!
Overview (Required)
I see there is an abstract "ArrayRecyclerAdapter" class which implements the Iterator interface. My wonder is why it is need?
In the case we really want the ability to iterate over the list, this line makes me feel unsafe.
Once you iterator over the list member, its content can be changed (calling Iterator#remove for example), and this changed may not be properly observed (i.e one may not call notifyChange properly due to the lack of documentation). The next question is should we allow the list to be changed by being an Iterator (rather than by normal add/addAll method)? In that case, please document out this usage by a simple comment.