Package com.day.cq.wcm.commons
Class ResourceIterator<T>
- java.lang.Object
-
- com.day.cq.wcm.commons.ResourceIterator<T>
-
- All Implemented Interfaces:
Iterator<T>
public class ResourceIterator<T> extends Object implements Iterator<T>
Implements a generic iterator based on an iterator of resources which adapts the element to the respective adapter type. Resources that cannot be adapted to the specified adapter type are skipped.
-
-
Constructor Summary
Constructors Constructor Description ResourceIterator(Iterator<Resource> base, Class<T> adapterType)
Creates a new iterator that is based on the given resource iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
T
next()
void
remove()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-