Class TrampoliningIterator<A,B>
- java.lang.Object
-
- com.jnape.palatable.lambda.internal.iteration.TrampoliningIterator<A,B>
-
- All Implemented Interfaces:
java.util.Iterator<B>
public final class TrampoliningIterator<A,B> extends java.lang.Object implements java.util.Iterator<B>
-
-
Field Summary
Fields Modifier and Type Field Description private A
a
private B
b
private Fn1<? super A,? extends java.lang.Iterable<RecursiveResult<A,B>>>
fn
private ImmutableQueue<java.util.Iterator<RecursiveResult<A,B>>>
remaining
-
Constructor Summary
Constructors Constructor Description TrampoliningIterator(Fn1<? super A,? extends java.lang.Iterable<RecursiveResult<A,B>>> fn, A a)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
B
next()
private <R> R
pruneAfter(Fn0<? extends R> fn)
private void
queueNextIfPossible()
private void
tickNext()
-
-
-
Field Detail
-
fn
private final Fn1<? super A,? extends java.lang.Iterable<RecursiveResult<A,B>>> fn
-
a
private final A a
-
remaining
private ImmutableQueue<java.util.Iterator<RecursiveResult<A,B>>> remaining
-
b
private B b
-
-