1. Write a group of generic static methods for examining and manipulating a collection of items via the collection’s iterator.
For example, one of the methods might have this heading:
When the find method is activated, the iterator, it, is already in some collection. The method searches the collection via the iterator. If one of the collection’s elements is equal to the target (using the equals method), then a reference to that element is returned; if the target is never found in the range, then the null reference is returned (and the iterator is left at a position that is just after the target).
Discuss and design other methods for your toolkit that manipulate a collection. As a starting point, please use the linked-list methods from the previous chapter.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here