Results 1 to 2 of 2
  1. #1
    swaralipi is offline Member
    Join Date
    Feb 2013
    Posts
    3
    Rep Power
    0

    Default Filtering Iterator Sample Code Required

    Hi,
    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.

    Thanks

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. (Help) Art and Science of Java Sample Code
    By TechTech in forum Eclipse
    Replies: 7
    Last Post: 07-23-2012, 07:37 PM
  2. sample crud operation code
    By java1 in forum Advanced Java
    Replies: 3
    Last Post: 11-18-2011, 01:15 PM
  3. Replies: 0
    Last Post: 05-18-2010, 01:53 AM
  4. Replies: 1
    Last Post: 03-04-2010, 12:19 PM
  5. Sample Code to Scan an Image
    By LankanSniper in forum Advanced Java
    Replies: 0
    Last Post: 03-24-2009, 03:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •