net.sf.statcvs.model
Class RevisionFilterIterator

java.lang.Object
  |
  +--net.sf.statcvs.model.RevisionFilterIterator
All Implemented Interfaces:
RevisionIterator

public class RevisionFilterIterator
extends java.lang.Object
implements RevisionIterator

Version:
$Id: RevisionFilterIterator.java,v 1.6 2003/03/18 10:33:55 lukasz Exp $
Author:
Manuel Schulze

Constructor Summary
RevisionFilterIterator(RevisionIterator revisionIterator, RevisionPredicate revisionPredicate)
          Creates a new instance from a source iterator and a filter predicate.
 
Method Summary
 boolean hasNext()
          Returns true if this iteration has more elements.
 CvsRevision next()
          Returns the next cvs revision or otherwise a NoSuchElementException is thrown.
 void reset()
          Resets this iteration to the first element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RevisionFilterIterator

public RevisionFilterIterator(RevisionIterator revisionIterator,
                              RevisionPredicate revisionPredicate)
Creates a new instance from a source iterator and a filter predicate. Only entries which match the predicate will become part of this iterator.

Parameters:
revisionIterator - the source revision iterator
revisionPredicate - the filter predicate
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: RevisionIterator
Returns true if this iteration has more elements.

Specified by:
hasNext in interface RevisionIterator
Returns:
True, if there are more revisions
See Also:
RevisionIterator.hasNext()

next

public CvsRevision next()
Description copied from interface: RevisionIterator
Returns the next cvs revision or otherwise a NoSuchElementException is thrown.

Specified by:
next in interface RevisionIterator
Returns:
The next revision
See Also:
RevisionIterator.next()

reset

public void reset()
Description copied from interface: RevisionIterator
Resets this iteration to the first element.

Specified by:
reset in interface RevisionIterator
See Also:
RevisionIterator.reset()