jfun.parsec

Class Catch1<T>

public final class Catch1<T> extends Object implements Catch<T>, Serializable

Catch1 implements Catch and recovers the exception only when the exception is the same object that it expects.

Author: Ben Yu 2004-11-13

Constructor Summary
Catch1(T target)
Create a Catch1 object.
Method Summary
Parser<T>catchException(Object v, 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.

Constructor Detail

Catch1

public Catch1(T target)
Create a Catch1 object.

Parameters: target the expected target exception object.

Method Detail

catchException

public Parser<T> catchException(Object v, 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.

See Also: Catch