[all packages]
[package net.sf.pizzacompiler.util]
[class hierarchy]
[index]
public abstract class net.sf.pizzacompiler.util.Enumerator<A>
(source file: /home/enno/source/tmp/pizza/main/src/net/sf/pizzacompiler/util/Enumerator.pizza)
java.lang.Object
|
+----net.sf.pizzacompiler.util.Enumerator<A>
The pure class interface.
public abstract class Enumerator<A>
implements Enumeration<A>
- an abstract class for implementations of the Enumeration interface
- Enumerator()
-
- concat(Enumerator<A>)
- concat another enumerator, to be called when this one is done
- dropWhile((A) -> boolean)
- return enumerator that starts with the first element of this
enumerator for which `p' holds,
- filter((A) -> boolean)
- return enumerator that yields all element of this enumerator that
satisfy predicate `p'.
- forall((A) -> B)
- apply function `f' to all elements of this enumerator
- hasMoreElements()
- the Enumeration methods
- map((A) -> B)
- return enumerator that yields `f' applied to each element
of this enumerator
- nextElement()
-
- reduceLeft(B, (B, A) -> B)
- reduce all elements of this enumerator with binary operation `f',
starting with `z'
- reduceRight((A, B) -> B, B)
- reduce all elements of this enumerator with binary operation `f',
starting with `z'
- takeWhile((A) -> boolean)
- return elements of this enumerator as long as predicate `p' is true
Enumerator
public Enumerator();
hasMoreElements
public abstract boolean hasMoreElements();
- the Enumeration methods
nextElement
public abstract A nextElement();
concat
public Enumerator<A> concat(Enumerator<A> rest);
- concat another enumerator, to be called when this one is done
map
public <B> Enumerator<B> map((A) -> B f);
- return enumerator that yields `f' applied to each element
of this enumerator
takeWhile
public Enumerator<A> takeWhile((A) -> boolean p);
- return elements of this enumerator as long as predicate `p' is true
dropWhile
public Enumerator<A> dropWhile((A) -> boolean p);
- return enumerator that starts with the first element of this
enumerator for which `p' holds, and then continues with all
subsequent elements of this enumerator
filter
public Enumerator<A> filter((A) -> boolean p);
- return enumerator that yields all element of this enumerator that
satisfy predicate `p'.
forall
public <B> void forall((A) -> B f);
- apply function `f' to all elements of this enumerator
reduceLeft
public <B> B reduceLeft(B z,
(B, A) -> B f);
- reduce all elements of this enumerator with binary operation `f',
starting with `z'. Operations are grouped to the left.
reduceRight
public <B> B reduceRight((A, B) -> B f,
B z);
- reduce all elements of this enumerator with binary operation `f',
starting with `z'. Operations are grouped to the right.
[all packages]
[package net.sf.pizzacompiler.util]
[class hierarchy]
[index]
net.sf.pizzacompiler.util.Enumerator.html