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.
- Author:
- Dimitrios Michail
-
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
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
-
Constructor Details
-
LiveIterableWrapper
public LiveIterableWrapper()Create a new wrapper -
LiveIterableWrapper
Create a new wrapper- Parameters:
supplier
- the supplier which provides the iterable
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfacejava.lang.Iterable<E>
-
getSupplier
Get the supplier- Returns:
- the supplier
-
setSupplier
Set the supplier- Parameters:
supplier
- the supplier
-