Class TranslatingIterator<F,T>

java.lang.Object
com.googlecode.objectify.util.TranslatingIterator<F,T>
All Implemented Interfaces:
Iterator<T>
Direct Known Subclasses:
TranslatingQueryResults

public abstract class TranslatingIterator<F,T> extends Object implements Iterator<T>
Iterator wrapper that translates from one type to another
Author:
Jeff Schnitzer invalid input: '<'[email protected]>
  • Field Details

  • Constructor Details

    • TranslatingIterator

      public TranslatingIterator(Iterator<F> base)
  • Method Details

    • translate

      protected abstract T translate(F from)
      You implement this - convert from one object to the other
    • hasNext

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

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

      public void remove()
      Specified by:
      remove in interface Iterator<F>