Filtering Iterator Sample Code Required
It would be great if you can help me with some sample code for the following scenario:
Create an Iterator filtering framework: (1) IObjectTest interface with a single boolean test(Object o) method and (2) an implementation of Iterator (let's call it FilteringIterator) which is initialized with another Iterator and an IObjectTest instance: new FilteringIterator(myIterator, myTest). Your FilteringIterator will then allow iteration over 'myIterator', but skipping any objects which don't pass the 'myTest' test. Create a simple unit test for this framework.
Re: Filtering Iterator Sample Code Required
Locking. It's fine to ask a question but please don't ask others to do your work for you.