commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1541713 - /commons/proper/functor/trunk/core/src/main/java/org/apache/commons/functor/generator/loop/IteratorToGeneratorAdapter.java
Date Wed, 13 Nov 2013 21:04:17 GMT
Author: mbenson
Date: Wed Nov 13 21:04:17 2013
New Revision: 1541713

URL: http://svn.apache.org/r1541713
Log:
final tweaks

Modified:
    commons/proper/functor/trunk/core/src/main/java/org/apache/commons/functor/generator/loop/IteratorToGeneratorAdapter.java

Modified: commons/proper/functor/trunk/core/src/main/java/org/apache/commons/functor/generator/loop/IteratorToGeneratorAdapter.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/main/java/org/apache/commons/functor/generator/loop/IteratorToGeneratorAdapter.java?rev=1541713&r1=1541712&r2=1541713&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/main/java/org/apache/commons/functor/generator/loop/IteratorToGeneratorAdapter.java
(original)
+++ commons/proper/functor/trunk/core/src/main/java/org/apache/commons/functor/generator/loop/IteratorToGeneratorAdapter.java
Wed Nov 13 21:04:17 2013
@@ -28,7 +28,8 @@ import org.apache.commons.lang3.Validate
  */
 public final class IteratorToGeneratorAdapter<E> extends LoopGenerator<E> {
     /**
-     * Helper iterator.
+     * Helper iterator; enforces that iterators from equal owners are considered equal.
+     * 
      * @param <E> the type of elements in this iterator.
      */
     private static class EqualityIterator<E> implements Iterator<E> {
@@ -36,10 +37,12 @@ public final class IteratorToGeneratorAd
          * Iterable that owns this iterator.
          */
         final Iterable<? extends E> owner;
+
         /**
          * Wrapped iterator.
          */
         final Iterator<? extends E> wrapped;
+
         /**
          * Create a new EqualityIterator.
          * @param owner iterable that owns this iterator
@@ -90,7 +93,7 @@ public final class IteratorToGeneratorAd
          */
         @Override
         public int hashCode() {
-            int hash = "IteratorToGeneratorAdapater$EqualityIterator".hashCode();
+            int hash = "IteratorToGeneratorAdapter$EqualityIterator".hashCode();
             hash <<= 2;
             hash ^= owner.hashCode();
             return hash;



Mime
View raw message