org.crosswire.jsword.book
Class BookFilterIterator

java.lang.Object
  extended by org.crosswire.jsword.book.BookFilterIterator
All Implemented Interfaces:
Iterator

public class BookFilterIterator
extends Object
implements Iterator

An iterator that filters as it goes.

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: BookFilterIterator.java,v 1.7 2005/03/19 01:56:47 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
Licence

Field Summary
private  BookFilter filter
          The value filter
private  Iterator it
          The source of filtered values
private  Book next
          The stored next value
 
Constructor Summary
BookFilterIterator(Iterator it, BookFilter filter)
          Simple ctor
 
Method Summary
private  Book findNext()
          Find the next (if there is one)
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

private Book next
The stored next value


it

private Iterator it
The source of filtered values


filter

private BookFilter filter
The value filter

Constructor Detail

BookFilterIterator

public BookFilterIterator(Iterator it,
                          BookFilter filter)
Simple ctor

Parameters:
filter - The filter to use, if null, will iterate over all values
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

findNext

private Book findNext()
Find the next (if there is one)


Copyright ? 2003-2004