Results 1 to 2 of 2
- 02-06-2013, 04:20 AM #1Member
- Join Date
- Feb 2013
- Rep Power
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.
- By TechTech in forum EclipseReplies: 7Last Post: 07-23-2012, 07:37 PM
- By java1 in forum Advanced JavaReplies: 3Last Post: 11-18-2011, 01:15 PM
- By Aldarius in forum New To JavaReplies: 0Last Post: 05-18-2010, 01:53 AM
- By sniffer139 in forum AWT / SwingReplies: 1Last Post: 03-04-2010, 12:19 PM
- By LankanSniper in forum Advanced JavaReplies: 0Last Post: 03-24-2009, 03:54 PM