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 Details

    • ResourceIterator

      public ResourceIterator(Iterator<Resource> base, Class<T> adapterType)
      Creates a new iterator that is based on the given resource iterator.
      Parameters:
      base - base iterator
      adapterType - adapter type
  • Method Details