Class Iterators.Transform<S,T>

java.lang.Object
edu.berkeley.nlp.lm.collections.Iterators.Transform<S,T>
All Implemented Interfaces:
Iterator<T>
Enclosing class:
Iterators

public abstract static class Iterators.Transform<S,T> extends Object implements Iterator<T>
Wraps a base iterator with a transformation function.
  • Constructor Details

    • Transform

      public Transform(Iterator<S> base)
  • Method Details

    • hasNext

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

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

      protected abstract T transform(S next)
    • remove

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