|
Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfj.parser.Result<I,A>
public final class Result<I,A>
A parse result made up of a value (A) and the remainder of the parse input (I).
Method Summary | ||
---|---|---|
|
bimap()
First-class bifunctor map. |
|
|
bimap(F<I,J> f,
F<A,B> g)
A bifunctor map across both the remainder of the parse input and the parse value. |
|
Iterator<A> |
iterator()
Returns an iterator over the parse value. |
|
|
mapRest()
First-class function mapping across the remainder of the parse input. |
|
|
mapRest(F<I,J> f)
Maps the given function across the remainder of the parse input. |
|
|
mapValue()
First-class function mapping across the parse value. |
|
|
mapValue(F<A,B> f)
Maps the given function across the parse value. |
|
I |
rest()
The remainder of the parse input. |
|
static
|
result()
First-class construction of a result. |
|
static
|
result(I i,
A a)
Construct a result with the given remainder of the parse input and parse value. |
|
A |
value()
The parsed value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public I rest()
public A value()
public <J> Result<J,A> mapRest(F<I,J> f)
f
- The function to map with.
public <J> F<F<I,J>,Result<J,A>> mapRest()
public <B> Result<I,B> mapValue(F<A,B> f)
f
- The function to map with.
public <B> F<F<A,B>,Result<I,B>> mapValue()
public <B,J> Result<J,B> bimap(F<I,J> f, F<A,B> g)
f
- The function to map the remainder of the parse input with.g
- The function to map the parse value with.
public <B,J> F<F<I,J>,F<F<A,B>,Result<J,B>>> bimap()
public Iterator<A> iterator()
for
-each loop.
iterator
in interface Iterable<A>
public static <A,I> Result<I,A> result(I i, A a)
i
- The remainder of the parse input.a
- The parse value.
public static <A,I> F<I,F<A,Result<I,A>>> result()
|
Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |