Package xyz.cofe.iter

Class UnionIterator<TValue>

java.lang.Object
xyz.cofe.iter.UnionIterator<TValue>
Type Parameters:
TValue - тип элементов
All Implemented Interfaces:
java.util.Iterator<TValue>

public class UnionIterator<TValue>
extends java.lang.Object
implements java.util.Iterator<TValue>
Итератор выдающий последовательность значений из итераторов
  • Constructor Summary

    Constructors 
    Constructor Description
    UnionIterator​(java.lang.Iterable<java.util.Iterator<TValue>> src)
    Конструктор
  • Method Summary

    Modifier and Type Method Description
    boolean hasNext()  
    TValue next()  
    void remove()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining
  • Constructor Details

    • UnionIterator

      public UnionIterator​(java.lang.Iterable<java.util.Iterator<TValue>> src)
      Конструктор
      Parameters:
      src - итераторы
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface java.util.Iterator<TValue>
    • next

      public TValue next()
      Specified by:
      next in interface java.util.Iterator<TValue>
    • remove

      public void remove()
      Specified by:
      remove in interface java.util.Iterator<TValue>