Package de.unruh.javapatterns
Class Case<In,Return,Exn extends java.lang.Throwable>
java.lang.Object
de.unruh.javapatterns.Case<In,Return,Exn>
- Type Parameters:
In
- Type of the value that is pattern matchedReturn
- Return value of the actionExn
- Exception that the action may throw. (The action is additionally allowed to throwPatternMatchReject
by invokingreject()
.
public class Case<In,Return,Exn extends java.lang.Throwable>
extends java.lang.Object
One case in a pattern match. Consists of a pattern and an action that has to happen
in case of a successful match. See
Match
. An instance of this class is
created using Match.withCase(Pattern, MatchSupplier)
.