Class CollectionScanner<E>

java.lang.Object
org.bzdev.util.CollectionScanner<E>
All Implemented Interfaces:
Iterable<E>

public class CollectionScanner<E> extends Object implements Iterable<E>
An Iterable for iterating over multiple collections.
  • Constructor Details

    • CollectionScanner

      public CollectionScanner()
  • Method Details

    • add

      public void add(Collection<? extends E> collection)
      Add a collection. The elements of this collection are added to the sequence of elements generated by an iterator. If the same collection is added twice, its elements appear twice.
      Parameters:
      collection - the collection to add.
      See Also:
    • iterator

      public Iterator<E> iterator()
      Get an iterator that will iterate over the elements of multiple collections.
      Specified by:
      iterator in interface Iterable<E>
      Returns:
      an iterator