Class LiveIterableWrapper<E>

  • Type Parameters:
    E - the element type
    All Implemented Interfaces:
    java.lang.Iterable<E>

    public class LiveIterableWrapper<E>
    extends java.lang.Object
    implements java.lang.Iterable<E>
    A wrapper around a supplier of an iterable.
    Author:
    Dimitrios Michail
    • Constructor Summary

      Constructors 
      Constructor Description
      LiveIterableWrapper()
      Create a new wrapper
      LiveIterableWrapper​(java.util.function.Supplier<java.lang.Iterable<E>> supplier)
      Create a new wrapper
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.function.Supplier<java.lang.Iterable<E>> getSupplier()
      Get the supplier
      java.util.Iterator<E> iterator()  
      void setSupplier​(java.util.function.Supplier<java.lang.Iterable<E>> supplier)
      Set the supplier
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • LiveIterableWrapper

        public LiveIterableWrapper()
        Create a new wrapper
      • LiveIterableWrapper

        public LiveIterableWrapper​(java.util.function.Supplier<java.lang.Iterable<E>> supplier)
        Create a new wrapper
        Parameters:
        supplier - the supplier which provides the iterable
    • Method Detail

      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<E>
      • getSupplier

        public java.util.function.Supplier<java.lang.Iterable<E>> getSupplier()
        Get the supplier
        Returns:
        the supplier
      • setSupplier

        public void setSupplier​(java.util.function.Supplier<java.lang.Iterable<E>> supplier)
        Set the supplier
        Parameters:
        supplier - the supplier