Class LiveIterableWrapper<E>

java.lang.Object
org.jgrapht.util.LiveIterableWrapper<E>
Type Parameters:
E - the element type
All Implemented Interfaces:
Iterable<E>

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

    • LiveIterableWrapper

      public LiveIterableWrapper()
      Create a new wrapper
    • LiveIterableWrapper

      public LiveIterableWrapper(Supplier<Iterable<E>> supplier)
      Create a new wrapper
      Parameters:
      supplier - the supplier which provides the iterable
  • Method Details

    • iterator

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

      public Supplier<Iterable<E>> getSupplier()
      Get the supplier
      Returns:
      the supplier
    • setSupplier

      public void setSupplier(Supplier<Iterable<E>> supplier)
      Set the supplier
      Parameters:
      supplier - the supplier