Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.nntp.spi
Class FNameFilterIterator

java.lang.Object
  extended by com.jivesoftware.forum.nntp.spi.PeekIterator
      extended by com.jivesoftware.forum.nntp.spi.FNameFilterIterator
All Implemented Interfaces:
java.util.Iterator

public class FNameFilterIterator
extends PeekIterator

Filters forums in the underlying forumIterator by name. Some news listing commands include name matching patterns or distribution lists (matching name prefixes) that reduces the number of forums listed.


Constructor Summary
FNameFilterIterator(java.util.Iterator forumIterator, NewsGroupFilter ngFilter)
          Create a new iterator wrapping the given one that filters out newsgroups that match the given filter.
 
Method Summary
 boolean hasNext()
          Return true if there is a next forum with an NNTP name that matches the news group name matching filter.
 java.lang.Object next()
          Return the next forum in the iterator who's NNTP name matches this iterator's filter.
 
Methods inherited from class com.jivesoftware.forum.nntp.spi.PeekIterator
peek, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FNameFilterIterator

public FNameFilterIterator(java.util.Iterator forumIterator,
                           NewsGroupFilter ngFilter)
Create a new iterator wrapping the given one that filters out newsgroups that match the given filter.

Parameters:
forumIterator - the iterator of forums that must be filtered.
ngFilter - the filter containing the names to remove.
Method Detail

hasNext

public boolean hasNext()
Return true if there is a next forum with an NNTP name that matches the news group name matching filter.

Specified by:
hasNext in interface java.util.Iterator
Overrides:
hasNext in class PeekIterator
Returns:
true if there is at least one more matching forum in the iterator.

next

public java.lang.Object next()
                      throws java.util.NoSuchElementException
Return the next forum in the iterator who's NNTP name matches this iterator's filter.

Specified by:
next in interface java.util.Iterator
Overrides:
next in class PeekIterator
Returns:
the next forum matching the filter.
Throws:
java.util.NoSuchElementException - if the iterator has no more elements.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.