Class 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
    • Constructor Detail

      • TranslatingIterator

        public TranslatingIterator​(Iterator<F> base)
    • Method Detail

      • 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>