Class Iterators


  • public class Iterators
    extends java.lang.Object
    Various convenient Iterator implementations.
    Author:
    Kohsuke Kawaguchi
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Iterators.Adapter<T,​U>
      Iterator that wraps another Iterator and changes its type.
      static class  Iterators.Array<T>
      Array iterator.
      static class  Iterators.Filter<T>
      Filter out objects from another iterator.
      static class  Iterators.Map<T,​U>
      For each U, apply U->Iterator<T> function and then iterate all the resulting T.
      static class  Iterators.Union<T>
      Union of two iterators.
    • Constructor Summary

      Constructors 
      Constructor Description
      Iterators()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.Iterator<T> empty()  
      static <T> java.util.Iterator<T> singleton​(T value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Iterators

        public Iterators()
    • Method Detail

      • empty

        public static <T> java.util.Iterator<T> empty()
      • singleton

        public static <T> java.util.Iterator<T> singleton​(T value)