jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r988970 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/
Date Wed, 25 Aug 2010 10:11:17 GMT
Author: jukka
Date: Wed Aug 25 10:11:16 2010
New Revision: 988970

URL: http://svn.apache.org/viewvc?rev=988970&view=rev
Log:
JCR-2722: Add a filtered RangeIterator

Revert revisions 988147 and 988172 to prevent binary backwards compatibilty issues reported
by Carsten Ziegeler

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/AccessControlPolicyIteratorAdapter.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventIteratorAdapter.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventListenerIteratorAdapter.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/FilteredRangeIterator.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeIteratorAdapter.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeTypeIteratorAdapter.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/PropertyIteratorAdapter.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RangeIteratorAdapter.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RowIteratorAdapter.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/VersionIteratorAdapter.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/AccessControlPolicyIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/AccessControlPolicyIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/AccessControlPolicyIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/AccessControlPolicyIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -16,15 +16,12 @@
  */
 package org.apache.jackrabbit.commons.iterator;
 
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
 import javax.jcr.RangeIterator;
 import javax.jcr.security.AccessControlPolicy;
 import javax.jcr.security.AccessControlPolicyIterator;
-
-import org.apache.jackrabbit.commons.predicate.Predicate;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
 
 /**
  * Adapter class for turning {@link RangeIterator}s or {@link Iterator}s
@@ -40,25 +37,21 @@ public class AccessControlPolicyIterator
         new AccessControlPolicyIteratorAdapter(RangeIteratorAdapter.EMPTY);
 
     /**
-     * Creates an adapter for the given {@link Iterator}.
+     * Creates an adapter for the given {@link RangeIterator}.
      *
      * @param iterator iterator of {@link AccessControlPolicy access control policies}.
      */
-    public AccessControlPolicyIteratorAdapter(Iterator<?> iterator) {
-        super(RangeIteratorAdapter.adapt(iterator));
+    public AccessControlPolicyIteratorAdapter(RangeIterator iterator) {
+        super(iterator);
     }
 
     /**
-     * Creates a filtered adapter for the given {@link Iterator}
-     * and {@link Predicate).
+     * Creates an adapter for the given {@link Iterator}.
      *
-     * @since Apache Jackrabbit 2.2
-     * @param iterator access control policy iterator
-     * @param predicate filtering predicate
+     * @param iterator iterator of {@link AccessControlPolicy access control policies}.
      */
-    public AccessControlPolicyIteratorAdapter(
-            Iterator<?> iterator, Predicate predicate) {
-        super(new FilteredRangeIterator(iterator, predicate));
+    public AccessControlPolicyIteratorAdapter(Iterator iterator) {
+        super(new RangeIteratorAdapter(iterator));
     }
 
     /**
@@ -66,7 +59,7 @@ public class AccessControlPolicyIterator
      *
      * @param collection collection of {@link AccessControlPolicy} objects.
      */
-    public AccessControlPolicyIteratorAdapter(Collection<?> collection) {
+    public AccessControlPolicyIteratorAdapter(Collection collection) {
         super(new RangeIteratorAdapter(collection));
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -24,8 +24,6 @@ import javax.jcr.RangeIterator;
 import javax.jcr.observation.Event;
 import javax.jcr.observation.EventIterator;
 
-import org.apache.jackrabbit.commons.predicate.Predicate;
-
 /**
  * Adapter class for turning {@link RangeIterator}s or {@link Iterator}s
  * into {@link EventIterator}s.
@@ -43,24 +41,21 @@ public class EventIteratorAdapter extend
     }
 
     /**
-     * Creates an adapter for the given {@link Iterator}.
+     * Creates an adapter for the given {@link RangeIterator}.
      *
-     * @param iterator iterator of {@link Event}s.
+     * @param iterator iterator of {@link Event}s
      */
-    public EventIteratorAdapter(Iterator<?> iterator) {
-        super(RangeIteratorAdapter.adapt(iterator));
+    public EventIteratorAdapter(RangeIterator iterator) {
+        super(iterator);
     }
 
     /**
-     * Creates a filtered adapter for the given {@link Iterator}
-     * and {@link Predicate).
+     * Creates an adapter for the given {@link Iterator}.
      *
-     * @since Apache Jackrabbit 2.2
-     * @param iterator event iterator
-     * @param predicate filtering predicate
+     * @param iterator iterator of {@link Event}s.
      */
-    public EventIteratorAdapter(Iterator<?> iterator, Predicate predicate) {
-        super(new FilteredRangeIterator(iterator, predicate));
+    public EventIteratorAdapter(Iterator iterator) {
+        super(new RangeIteratorAdapter(iterator));
     }
 
     /**
@@ -68,7 +63,7 @@ public class EventIteratorAdapter extend
      *
      * @param collection collection of {@link Event}s
      */
-    public EventIteratorAdapter(Collection<?> collection) {
+    public EventIteratorAdapter(Collection collection) {
         super(new RangeIteratorAdapter(collection));
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventListenerIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventListenerIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventListenerIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/EventListenerIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -24,8 +24,6 @@ import javax.jcr.RangeIterator;
 import javax.jcr.observation.EventListener;
 import javax.jcr.observation.EventListenerIterator;
 
-import org.apache.jackrabbit.commons.predicate.Predicate;
-
 /**
  * Adapter class for turning {@link RangeIterator}s or {@link Iterator}s
  * into {@link EventListenerIterator}s.
@@ -40,25 +38,21 @@ public class EventListenerIteratorAdapte
         new EventListenerIteratorAdapter(RangeIteratorAdapter.EMPTY);
 
     /**
-     * Creates an adapter for the given {@link Iterator}.
+     * Creates an adapter for the given {@link RangeIterator}.
      *
      * @param iterator iterator of {@link EventListener}s
      */
-    public EventListenerIteratorAdapter(Iterator<?> iterator) {
-        super(RangeIteratorAdapter.adapt(iterator));
+    public EventListenerIteratorAdapter(RangeIterator iterator) {
+        super(iterator);
     }
 
     /**
-     * Creates a filtered adapter for the given {@link Iterator}
-     * and {@link Predicate).
+     * Creates an adapter for the given {@link Iterator}.
      *
-     * @since Apache Jackrabbit 2.2
-     * @param iterator event listener iterator
-     * @param predicate filtering predicate
+     * @param iterator iterator of {@link EventListener}s
      */
-    public EventListenerIteratorAdapter(
-            Iterator<?> iterator, Predicate predicate) {
-        super(new FilteredRangeIterator(iterator, predicate));
+    public EventListenerIteratorAdapter(Iterator iterator) {
+        super(new RangeIteratorAdapter(iterator));
     }
 
     /**
@@ -66,7 +60,7 @@ public class EventListenerIteratorAdapte
      *
      * @param collection collection of {@link EventListener}s
      */
-    public EventListenerIteratorAdapter(Collection<?> collection) {
+    public EventListenerIteratorAdapter(Collection collection) {
         super(new RangeIteratorAdapter(collection));
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/FilteredRangeIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/FilteredRangeIterator.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/FilteredRangeIterator.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/FilteredRangeIterator.java
Wed Aug 25 10:11:16 2010
@@ -25,8 +25,6 @@ import org.apache.jackrabbit.commons.pre
 
 /**
  * Filtering decorator for iterators.
- *
- * @since Apache Jackrabbit 2.2
  */
 public class FilteredRangeIterator implements RangeIterator {
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -24,8 +24,6 @@ import javax.jcr.Node;
 import javax.jcr.NodeIterator;
 import javax.jcr.RangeIterator;
 
-import org.apache.jackrabbit.commons.predicate.Predicate;
-
 /**
  * Adapter class for turning {@link RangeIterator}s or {@link Iterator}s
  * into {@link NodeIterator}s.
@@ -40,24 +38,21 @@ public class NodeIteratorAdapter extends
         new NodeIteratorAdapter(RangeIteratorAdapter.EMPTY);
 
     /**
-     * Creates an adapter for the given {@link Iterator}.
+     * Creates an adapter for the given {@link RangeIterator}.
      *
      * @param iterator iterator of {@link Node}s
      */
-    public NodeIteratorAdapter(Iterator<?> iterator) {
-        super(RangeIteratorAdapter.adapt(iterator));
+    public NodeIteratorAdapter(RangeIterator iterator) {
+        super(iterator);
     }
 
     /**
-     * Creates a filtered adapter for the given {@link Iterator}
-     * and {@link Predicate).
+     * Creates an adapter for the given {@link Iterator}.
      *
-     * @since Apache Jackrabbit 2.2
-     * @param iterator node iterator
-     * @param predicate filtering predicate
+     * @param iterator iterator of {@link Node}s
      */
-    public NodeIteratorAdapter(Iterator<?> iterator, Predicate predicate) {
-        super(new FilteredRangeIterator(iterator, predicate));
+    public NodeIteratorAdapter(Iterator iterator) {
+        super(new RangeIteratorAdapter(iterator));
     }
 
     /**
@@ -65,7 +60,7 @@ public class NodeIteratorAdapter extends
      *
      * @param collection collection of {@link Node}s
      */
-    public NodeIteratorAdapter(Collection<?> collection) {
+    public NodeIteratorAdapter(Collection collection) {
         super(new RangeIteratorAdapter(collection));
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeTypeIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeTypeIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeTypeIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/NodeTypeIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -24,8 +24,6 @@ import javax.jcr.RangeIterator;
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.NodeTypeIterator;
 
-import org.apache.jackrabbit.commons.predicate.Predicate;
-
 /**
  * Adapter class for turning {@link RangeIterator}s or {@link Iterator}s
  * into {@link NodeTypeIterator}s.
@@ -40,24 +38,21 @@ public class NodeTypeIteratorAdapter ext
         new NodeTypeIteratorAdapter(RangeIteratorAdapter.EMPTY);
 
     /**
-     * Creates an adapter for the given {@link Iterator}.
+     * Creates an adapter for the given {@link RangeIterator}.
      *
      * @param iterator iterator of {@link NodeType}s
      */
-    public NodeTypeIteratorAdapter(Iterator<?> iterator) {
-        super(RangeIteratorAdapter.adapt(iterator));
+    public NodeTypeIteratorAdapter(RangeIterator iterator) {
+        super(iterator);
     }
 
     /**
-     * Creates a filtered adapter for the given {@link Iterator}
-     * and {@link Predicate).
+     * Creates an adapter for the given {@link Iterator}.
      *
-     * @since Apache Jackrabbit 2.2
-     * @param iterator node type iterator
-     * @param predicate filtering predicate
+     * @param iterator iterator of {@link NodeType}s
      */
-    public NodeTypeIteratorAdapter(Iterator<?> iterator, Predicate predicate) {
-        super(new FilteredRangeIterator(iterator, predicate));
+    public NodeTypeIteratorAdapter(Iterator iterator) {
+        super(new RangeIteratorAdapter(iterator));
     }
 
     /**
@@ -65,7 +60,7 @@ public class NodeTypeIteratorAdapter ext
      *
      * @param collection collection of {@link NodeType}s
      */
-    public NodeTypeIteratorAdapter(Collection<?> collection) {
+    public NodeTypeIteratorAdapter(Collection<NodeType> collection) {
         super(new RangeIteratorAdapter(collection));
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/PropertyIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/PropertyIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/PropertyIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/PropertyIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -24,8 +24,6 @@ import javax.jcr.Property;
 import javax.jcr.PropertyIterator;
 import javax.jcr.RangeIterator;
 
-import org.apache.jackrabbit.commons.predicate.Predicate;
-
 /**
  * Adapter class for turning {@link RangeIterator}s or {@link Iterator}s
  * into {@link PropertyIterator}s.
@@ -40,24 +38,21 @@ public class PropertyIteratorAdapter ext
         new PropertyIteratorAdapter(RangeIteratorAdapter.EMPTY);
 
     /**
-     * Creates an adapter for the given {@link Iterator}.
+     * Creates an adapter for the given {@link RangeIterator}.
      *
      * @param iterator iterator of {@link Property} instances
      */
-    public PropertyIteratorAdapter(Iterator<?> iterator) {
-        super(RangeIteratorAdapter.adapt(iterator));
+    public PropertyIteratorAdapter(RangeIterator iterator) {
+        super(iterator);
     }
 
     /**
-     * Creates a filtered adapter for the given {@link Iterator}
-     * and {@link Predicate).
+     * Creates an adapter for the given {@link Iterator}.
      *
-     * @since Apache Jackrabbit 2.2
-     * @param iterator property iterator
-     * @param predicate filtering predicate
+     * @param iterator iterator of {@link Property} instances
      */
-    public PropertyIteratorAdapter(Iterator<?> iterator, Predicate predicate) {
-        super(new FilteredRangeIterator(iterator, predicate));
+    public PropertyIteratorAdapter(Iterator iterator) {
+        super(new RangeIteratorAdapter(iterator));
     }
 
     /**
@@ -65,7 +60,7 @@ public class PropertyIteratorAdapter ext
      *
      * @param collection collection of {@link Property} instances
      */
-    public PropertyIteratorAdapter(Collection<?> collection) {
+    public PropertyIteratorAdapter(Collection collection) {
         super(new RangeIteratorAdapter(collection));
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RangeIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RangeIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RangeIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RangeIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -37,26 +37,9 @@ public class RangeIteratorAdapter implem
         new RangeIteratorAdapter(Collections.EMPTY_LIST);
 
     /**
-     * Adapts the given iterator into a range iterator. The given
-     * instance is returned as-is if it already implements the
-     * {@link RangeIterator} interface. Otherwise the iterator is
-     * wrapped into a {@link RangeIteratorAdapter} instance.
-     * 
-     * @param iterator iterator to adapt
-     * @return adapted iterator
-     */
-    public static RangeIterator adapt(Iterator<?> iterator) {
-        if (iterator instanceof RangeIterator) {
-            return (RangeIterator) iterator;
-        } else {
-            return new RangeIteratorAdapter(iterator, -1);
-        }
-    }
-
-    /**
      * The adapted iterator instance.
      */
-    private final Iterator<?> iterator;
+    private final Iterator iterator;
 
     /**
      * Number of elements in the adapted iterator, or -1 if unknown.
@@ -74,7 +57,7 @@ public class RangeIteratorAdapter implem
      * @param iterator adapted iterator
      * @param size size of the iterator, or -1 if unknown
      */
-    public RangeIteratorAdapter(Iterator<?> iterator, long size) {
+    public RangeIteratorAdapter(Iterator iterator, long size) {
         this.iterator = iterator;
         this.size = size;
         this.position = 0;
@@ -85,7 +68,7 @@ public class RangeIteratorAdapter implem
      *
      * @param iterator adapted iterator
      */
-    public RangeIteratorAdapter(Iterator<?> iterator) {
+    public RangeIteratorAdapter(Iterator iterator) {
         this(iterator, -1);
     }
 
@@ -94,7 +77,7 @@ public class RangeIteratorAdapter implem
      *
      * @param collection the collection to iterate
      */
-    public RangeIteratorAdapter(Collection<?> collection) {
+    public RangeIteratorAdapter(Collection collection) {
         this(collection.iterator(), collection.size());
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RowIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RowIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RowIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/RowIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -24,8 +24,6 @@ import javax.jcr.RangeIterator;
 import javax.jcr.query.Row;
 import javax.jcr.query.RowIterator;
 
-import org.apache.jackrabbit.commons.predicate.Predicate;
-
 /**
  * Adapter class for turning {@link RangeIterator}s or {@link Iterator}s
  * into {@link RowIterator}s.
@@ -40,24 +38,21 @@ public class RowIteratorAdapter extends 
         new RowIteratorAdapter(RangeIteratorAdapter.EMPTY);
 
     /**
-     * Creates an adapter for the given {@link Iterator}.
+     * Creates an adapter for the given {@link RangeIterator}.
      *
      * @param iterator iterator of {@link Row}s
      */
-    public RowIteratorAdapter(Iterator<?> iterator) {
-        super(RangeIteratorAdapter.adapt(iterator));
+    public RowIteratorAdapter(RangeIterator iterator) {
+        super(iterator);
     }
 
     /**
-     * Creates a filtered adapter for the given {@link Iterator}
-     * and {@link Predicate).
+     * Creates an adapter for the given {@link Iterator}.
      *
-     * @since Apache Jackrabbit 2.2
-     * @param iterator row iterator
-     * @param predicate filtering predicate
+     * @param iterator iterator of {@link Row}s
      */
-    public RowIteratorAdapter(Iterator<?> iterator, Predicate predicate) {
-        super(new FilteredRangeIterator(iterator, predicate));
+    public RowIteratorAdapter(Iterator iterator) {
+        super(new RangeIteratorAdapter(iterator));
     }
 
     /**
@@ -65,7 +60,7 @@ public class RowIteratorAdapter extends 
      *
      * @param collection collection of {@link Row}s
      */
-    public RowIteratorAdapter(Collection<?> collection) {
+    public RowIteratorAdapter(Collection collection) {
         super(new RangeIteratorAdapter(collection));
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/VersionIteratorAdapter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/VersionIteratorAdapter.java?rev=988970&r1=988969&r2=988970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/VersionIteratorAdapter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/iterator/VersionIteratorAdapter.java
Wed Aug 25 10:11:16 2010
@@ -24,8 +24,6 @@ import javax.jcr.RangeIterator;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionIterator;
 
-import org.apache.jackrabbit.commons.predicate.Predicate;
-
 /**
  * Adapter class for turning {@link RangeIterator}s or {@link Iterator}s
  * into {@link VersionIterator}s.
@@ -40,24 +38,21 @@ public class VersionIteratorAdapter exte
         new VersionIteratorAdapter(RangeIteratorAdapter.EMPTY);
 
     /**
-     * Creates an adapter for the given {@link Iterator}.
+     * Creates an adapter for the given {@link RangeIterator}.
      *
      * @param iterator iterator of {@link Version}s
      */
-    public VersionIteratorAdapter(Iterator<?> iterator) {
-        super(RangeIteratorAdapter.adapt(iterator));
+    public VersionIteratorAdapter(RangeIterator iterator) {
+        super(iterator);
     }
 
     /**
-     * Creates a filtered adapter for the given {@link Iterator}
-     * and {@link Predicate).
+     * Creates an adapter for the given {@link Iterator}.
      *
-     * @since Apache Jackrabbit 2.2
-     * @param iterator version iterator
-     * @param predicate filtering predicate
+     * @param iterator iterator of {@link Version}s
      */
-    public VersionIteratorAdapter(Iterator<?> iterator, Predicate predicate) {
-        super(new FilteredRangeIterator(iterator, predicate));
+    public VersionIteratorAdapter(Iterator iterator) {
+        super(new RangeIteratorAdapter(iterator));
     }
 
     /**
@@ -65,7 +60,7 @@ public class VersionIteratorAdapter exte
      *
      * @param collection collection of {@link Version}s
      */
-    public VersionIteratorAdapter(Collection<?> collection) {
+    public VersionIteratorAdapter(Collection collection) {
         super(new RangeIteratorAdapter(collection));
     }
 



Mime
View raw message