- java.lang.Object
-
- org.jgrapht.util.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.
-
-
Constructor Summary
Constructors Constructor Description LiveIterableWrapper()
Create a new wrapperLiveIterableWrapper(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 supplierjava.util.Iterator<E>
iterator()
void
setSupplier(java.util.function.Supplier<java.lang.Iterable<E>> supplier)
Set the supplier
-
-
-
Field Detail
-
supplier
private java.util.function.Supplier<java.lang.Iterable<E>> supplier
-
-
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 interfacejava.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
-
-