You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/09/24 02:25:47 UTC
svn commit: r1175080 -
/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterator.java
Author: simonetripodi
Date: Sat Sep 24 00:25:47 2011
New Revision: 1175080
URL: http://svn.apache.org/viewvc?rev=1175080&view=rev
Log:
added missing javadoc comments
Modified:
commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterator.java
Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterator.java?rev=1175080&r1=1175079&r2=1175080&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterator.java (original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterator.java Sat Sep 24 00:25:47 2011
@@ -24,6 +24,8 @@ import org.apache.commons.functor.UnaryP
/**
* Iterator that filters another Iterator by only passing through those elements
* that are matched by a specified UnaryPredicate.
+ *
+ * @param <T> the {@link Iterator} generic type
* @version $Revision$ $Date$
* @author Rodney Waldhoff
*/
@@ -31,11 +33,26 @@ public final class FilteredIterator<T> i
// attributes
// ------------------------------------------------------------------------
+ /**
+ * The predicate used to test this Iterator elements.
+ */
private final UnaryPredicate<? super T> predicate;
+ /**
+ * The wrapped iterator.
+ */
private final Iterator<? extends T> iterator;
+ /**
+ * Reference to next element has to be returned by this iterator.
+ */
private T next = null;
+ /**
+ * Flag to mark this iterator has more elements or not.
+ */
private boolean nextSet = false;
+ /**
+ * Flag to mark current iterator element can be removed.
+ */
private boolean canRemove = false;
// constructor
@@ -128,6 +145,7 @@ public final class FilteredIterator<T> i
// ------------------------------------------------------------------------
/**
* Get a filtered Iterator instance applying <code>pred</code> to <code>iter</code>.
+ * @param <T> the input iterator generic type
* @param iter to filter
* @param pred to apply
* @return Iterator