commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1175059 - /commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java
Date Fri, 23 Sep 2011 22:35:16 GMT
Author: simonetripodi
Date: Fri Sep 23 22:35:16 2011
New Revision: 1175059

URL: http://svn.apache.org/viewvc?rev=1175059&view=rev
Log:
added missing javadoc comments

Modified:
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java?rev=1175059&r1=1175058&r2=1175059&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java
Fri Sep 23 22:35:16 2011
@@ -29,29 +29,47 @@ import org.apache.commons.functor.core.c
  *
  * @version $Revision$ $Date$
  *
- * @param <T>
+ * @param <T> the Iterable generic type
  */
 public class FilteredIterable<T> implements Iterable<T> {
+    /**
+     * A default {@code FilteredIterable} static instance that iterates over an empty collection.
+     */
     @SuppressWarnings({ "rawtypes", "unchecked" })
     // type irrelevant for empty instance
     private static final FilteredIterable EMPTY = new FilteredIterable(Collections.EMPTY_LIST)
{
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public FilteredIterable retain(Class type) {
             return this;
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public synchronized FilteredIterable retain(UnaryPredicate predicate) {
             return this;
         }
 
+        /**
+         * {@inheritDoc}
+         */
         @Override
         public FilteredIterable retain(Class... ofType) {
             return this;
         }
     };
 
+    /**
+     * The {@link Iterable} has to be filtered.
+     */
     private final Iterable<? extends T> iterable;
+    /**
+     * The predicate used to test input {@link Iterable} elements.
+     */
     private UnaryAnd<T> predicate;
 
     /**
@@ -70,6 +88,9 @@ public class FilteredIterable<T> impleme
         return FilteredIterator.filter(iterable.iterator(), predicate);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public String toString() {
         return "FilteredIterable<" + iterable + ">";
@@ -95,7 +116,8 @@ public class FilteredIterable<T> impleme
 
     /**
      * Retain elements of a given type with type-safety.
-     * @param <U>
+     *
+     * @param <U> the input Class generic type.
      * @param type filter, non-<code>null</code>
      * @return new FilteredIterable instance that delegates to <code>this</code>
      */
@@ -147,7 +169,7 @@ public class FilteredIterable<T> impleme
      * Get a {@link FilteredIterable} of <code>iterable</code>.  If <code>wrapped</code>
is <code>null</code>,
      * result will also be <code>null</code>.  A {@link FilteredIterable} argument
will be passed back
      * directly; any other argument will be wrapped in a new {@link FilteredIterable} object.
-     * @param <T>
+     * @param <T> the input iterable generic type
      * @param iterable wrapped
      * @return FilteredIterable
      */
@@ -163,7 +185,7 @@ public class FilteredIterable<T> impleme
 
     /**
      * Get an empty FilteredIterable.
-     * @param <T>
+     * @param <T> the expected {@link Iterable} generic type.
      * @return FilteredIterable<T>
      */
     @SuppressWarnings("unchecked")



Mime
View raw message