|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjfun.parsec.Catch1<T>
public final class Catch1<T>
Catch1 implements Catch and recovers the exception only when the exception is the same object that it expects.
Constructor Summary | |
---|---|
Catch1(T target)
Create a Catch1 object. |
Method Summary | |
---|---|
Parser<T> |
catchException(java.lang.Object v,
java.lang.Object e)
if e is the same as the target object that this Catch object is expecting, it recovers the parser and make v the current return value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Catch1(T target)
target
- the expected target exception object.Method Detail |
---|
public Parser<T> catchException(java.lang.Object v, java.lang.Object e)
catchException
in interface Catch<T>
v
- the return value of the exceptional parser.e
- the exception thrown.
Catch.catchException(java.lang.Object, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |