Class ZipIterator<T1,T2>

java.lang.Object
com.github.basking2.sdsai.itrex.iterators.ZipIterator<T1,T2>
All Implemented Interfaces:
Iterator<TwoTuple<T1,T2>>

public class ZipIterator<T1,T2> extends Object implements Iterator<TwoTuple<T1,T2>>
  • Constructor Details

    • ZipIterator

      public ZipIterator(Iterator<T1> iterator1, boolean pad1, T1 pad1Values, Iterator<T2> iterator2, boolean pad2, T2 pad2Values)
      Zip two iterators with lots of padding options.
      Parameters:
      iterator1 - The first iterator.
      pad1 - If the first iterator is empty, pad with a value.
      pad1Values - The value to pad with.
      iterator2 - The second iterator.
      pad2 - If the second iterator is empty, pad with a value.
      pad2Values - The value to pad with.
    • ZipIterator

      public ZipIterator(Iterator<T1> iterator1, Iterator<T2> iterator2)
      Construct a zip iterator that offers no new elements when either iterator is complete.
      Parameters:
      iterator1 - The first iterator. This is not padded.
      iterator2 - The second iterator. This is not padded.
  • Method Details