Class AdapterIterator<T,U>

java.lang.Object
com.sun.enterprise.module.common_impl.AdapterIterator<T,U>
All Implemented Interfaces:
Iterator<T>

public abstract class AdapterIterator<T,U> extends Object implements Iterator<T>
Iterator implementation that works as a filter to another iterator.
  • Field Details

    • core

      private final Iterator<? extends U> core
    • next

      private T next
  • Constructor Details

    • AdapterIterator

      public AdapterIterator(Iterator<? extends U> core)
  • Method Details

    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • fetch

      private void fetch()
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>
    • adapt

      protected abstract T adapt(U u)
      Returns:
      null to filter out this object. Non-null object will be returned from the iterator to the caller.