Package fj.data
Class Iteratee.IterV<E,A>
- java.lang.Object
-
- fj.data.Iteratee.IterV<E,A>
-
- Enclosing class:
- Iteratee
public abstract static class Iteratee.IterV<E,A> extends java.lang.Object
A pure iteratee computation which is either done or needs more input
-
-
Constructor Summary
Constructors Constructor Description IterV()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <B> Iteratee.IterV<E,B>
bind(F<A,Iteratee.IterV<E,B>> f)
TODO more documentationstatic <E,A>
Iteratee.IterV<E,A>cont(F<Iteratee.Input<E>,Iteratee.IterV<E,A>> f)
A computation that takes an element from an input to yield a new computationstatic <E,A>
Iteratee.IterV<E,A>done(A a, Iteratee.Input<E> i)
A computation that has finishedstatic <E> Iteratee.IterV<E,Unit>
drop(int n)
An iteratee that skips the first n elements of the inputabstract <Z> Z
fold(F<P2<A,Iteratee.Input<E>>,Z> done, F<F<Iteratee.Input<E>,Iteratee.IterV<E,A>>,Z> cont)
static <E> Iteratee.IterV<E,Option<E>>
head()
An iteratee that consumes the head of the inputstatic <E> Iteratee.IterV<E,java.lang.Integer>
length()
An iteratee that counts and consumes the elements of the inputstatic <E> Iteratee.IterV<E,List<E>>
list()
An iteratee that consumes the input elements and returns them as a list in reverse order, so that the last line is the first element.static <E> Iteratee.IterV<E,Option<E>>
peek()
An iteratee that returns the first element of the inputA
run()
-
-
-
Method Detail
-
cont
public static <E,A> Iteratee.IterV<E,A> cont(F<Iteratee.Input<E>,Iteratee.IterV<E,A>> f)
A computation that takes an element from an input to yield a new computation
-
fold
public abstract <Z> Z fold(F<P2<A,Iteratee.Input<E>>,Z> done, F<F<Iteratee.Input<E>,Iteratee.IterV<E,A>>,Z> cont)
-
done
public static <E,A> Iteratee.IterV<E,A> done(A a, Iteratee.Input<E> i)
A computation that has finished
-
run
public final A run()
-
bind
public final <B> Iteratee.IterV<E,B> bind(F<A,Iteratee.IterV<E,B>> f)
TODO more documentation
-
length
public static <E> Iteratee.IterV<E,java.lang.Integer> length()
An iteratee that counts and consumes the elements of the input
-
drop
public static <E> Iteratee.IterV<E,Unit> drop(int n)
An iteratee that skips the first n elements of the input
-
head
public static <E> Iteratee.IterV<E,Option<E>> head()
An iteratee that consumes the head of the input
-
peek
public static <E> Iteratee.IterV<E,Option<E>> peek()
An iteratee that returns the first element of the input
-
list
public static <E> Iteratee.IterV<E,List<E>> list()
An iteratee that consumes the input elements and returns them as a list in reverse order, so that the last line is the first element. This allows to build a list from 2 iteratees.
-
-