org.crosswire.jsword.book
Class BookFilterIterator

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

public class BookFilterIterator
extends Object
implements Iterable, Iterator

An iterator that filters as it goes.

Author:
Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Field Summary
private  BookFilter filter
          The value filter
private  Iterator it
           
private  Book next
          The stored next value
 
Constructor Summary
BookFilterIterator(List books, BookFilter filter)
          Simple ctor
 
Method Summary
private  Book findNext()
          Find the next (if there is one)
 boolean hasNext()
           
 Iterator iterator()
           
 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

filter

private BookFilter filter
The value filter

Constructor Detail

BookFilterIterator

public BookFilterIterator(List books,
                          BookFilter filter)
Simple ctor

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

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable

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-2007