From 4b266ff8bcfb1dde9f65f0e8a41ca4d21bbfd659 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Fri, 1 Feb 2002 16:27:40 +0000 Subject: [PATCH] Applied patch submitted by Michael Smith that clarifies the description of the FilterIterator git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130510 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/collections/FilterIterator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/java/org/apache/commons/collections/FilterIterator.java b/src/java/org/apache/commons/collections/FilterIterator.java index ac8b17e90..aa19ceddb 100644 --- a/src/java/org/apache/commons/collections/FilterIterator.java +++ b/src/java/org/apache/commons/collections/FilterIterator.java @@ -12,6 +12,10 @@ import java.util.NoSuchElementException; /** A Proxy {@link Iterator Iterator} which takes a {@link Predicate Predicate} instance to filter * out objects from an underlying {@link Iterator Iterator} instance. + * out objects from an underlying {@link Iterator Iterator} instance. + * Only objects for which the + * specified Predicate evaluates to true are + * returned. * * @author James Strachan * @author Jan Sorensen @@ -41,6 +45,8 @@ public class FilterIterator extends ProxyIterator { // Iterator interface //------------------------------------------------------------------------- + + /** @return true if there is another object that matches the given predicate */ public boolean hasNext() { if ( nextObjectSet ) { return true; @@ -49,6 +55,7 @@ public class FilterIterator extends ProxyIterator { } } + /** @return the next object which matches the given predicate */ public Object next() { if ( !nextObjectSet ) { if (!setNextObject()) {