Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.book
Class BookFilterIterator

    java.lang.Object
      org.crosswire.jsword.book.BookFilterIterator

All Implemented Interfaces:
  Iterable<Book>, Iterator<Book>

    public class BookFilterIterator

extends Object
implements Iterable<Book>, Iterator<Book>

An iterator that filters as it goes.

Author:
  Joe Walker, DM Smith
See Also:
  `The GNU Lesser General Public License for details.`

Field Summary
`private BookFilter` | `filter` The value filter
`private Iterator<Book>` | `it`
`private Book` | `next` The stored next value

Constructor Summary
`BookFilterIterator(Iterable<Book> books, BookFilter filter)` Simple ctor

Method Summary
`private Book` | `findNext()` Find the next (if there is one)
`boolean` | `hasNext()`
`Iterator<Book>` | `iterator()`
`Book` | `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<Book> it

### filter

    private BookFilter filter

  The value filter

Constructor Detail

### BookFilterIterator

    public BookFilterIterator(Iterable<Book> books,
                              BookFilter filter)

  Simple ctor

  Parameters:
    `books` - an iterator over a set of books
    `filter` - The filter to use, if null, will iterate over all values

Method Detail

### iterator

    public Iterator<Book> iterator()

  Specified by:
    `iterator` in interface `Iterable<Book>`

### hasNext

    public boolean hasNext()

  Specified by:
    `hasNext` in interface `Iterator<Book>`

### next

    public Book next()

  Specified by:
    `next` in interface `Iterator<Book>`

### remove

    public void remove()

  Specified by:
    `remove` in interface `Iterator<Book>`

### findNext

    private Book findNext()

  Find the next (if there is one)

  Returns:
    the next book

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2015
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD