Index

A C D F I M N O P R T V W 
All Classes|All Packages

A

And(Pattern<? super T>...) - Static method in class de.unruh.javapatterns.Patterns
Pattern that combined several subpatterns that all need to be match.
Any - Static variable in class de.unruh.javapatterns.Patterns
Pattern that matches everything (including null).
apply(MatchManager, T) - Method in class de.unruh.javapatterns.Capture
 
apply(MatchManager, T) - Method in class de.unruh.javapatterns.Pattern
Performs the pattern match.
Array(Pattern<? super T>...) - Static method in class de.unruh.javapatterns.Patterns
Pattern that matches an array.

C

call() - Method in interface de.unruh.javapatterns.MatchSupplier
 
capture(String) - Static method in class de.unruh.javapatterns.Pattern
Creates a new capture variable.
Capture<T> - Class in de.unruh.javapatterns
A capturing variable in a pattern match.
Case<In,​Return,​Exn extends java.lang.Throwable> - Class in de.unruh.javapatterns
One case in a pattern match.

D

de.unruh.javapatterns - package de.unruh.javapatterns
A library for functional pattern matching in Java.

F

fillInStackTrace() - Method in exception de.unruh.javapatterns.PatternMatchReject
 

I

Instance(Pattern<? super U>) - Constructor for class de.unruh.javapatterns.Patterns.Instance
See the class description for how to create this pattern.
Instance(Class<U>, Pattern<? super U>) - Static method in class de.unruh.javapatterns.Patterns
Pattern that matches if the matched value has a specific type U.
InvalidPatternMatch - Exception in de.unruh.javapatterns
 
InvalidPatternMatch(String) - Constructor for exception de.unruh.javapatterns.InvalidPatternMatch
 
Is(Capture<T>) - Static method in class de.unruh.javapatterns.Patterns
Pattern that matches if the matched value equals the value in the captured variable expected.
Is(Predicate<? super T>) - Static method in class de.unruh.javapatterns.Patterns
Pattern that matches if the matched value satisfies a predicate.
Is(Supplier<T>) - Static method in class de.unruh.javapatterns.Patterns
Pattern that matches if the matched value equals the value computed by expected.
Is(T) - Static method in class de.unruh.javapatterns.Patterns
Pattern that matches if the matched value equals expected.
isAssigned() - Method in class de.unruh.javapatterns.Capture
Returns whether this capture has been assigned.

M

match(In, Case<In, Return, Exn>...) - Static method in class de.unruh.javapatterns.Match
Performs a pattern match.
Match - Class in de.unruh.javapatterns
Functions for invoking pattern matches.
MatchException - Exception in de.unruh.javapatterns
 
MatchException(Object) - Constructor for exception de.unruh.javapatterns.MatchException
 
MatchManager - Class in de.unruh.javapatterns
Manages the state of captured variables in a pattern match.
MatchRunnable<Exn extends java.lang.Throwable> - Interface in de.unruh.javapatterns
 
MatchSupplier<Return,​Exn extends java.lang.Throwable> - Interface in de.unruh.javapatterns
 

N

NoMatch(Pattern<? super T>) - Static method in class de.unruh.javapatterns.Patterns
 
NotNull(Pattern<? super T>) - Static method in class de.unruh.javapatterns.Patterns
Pattern that matches non-null values.
Null - Static variable in class de.unruh.javapatterns.Patterns
Pattern that matches only null.

O

Or(Pattern<? super T>...) - Static method in class de.unruh.javapatterns.Patterns
Pattern that combined several subpatterns of which one needs to match.

P

Pattern<T> - Class in de.unruh.javapatterns
A pattern that matches a value and assigns values to capture variables (Capture).
Pattern() - Constructor for class de.unruh.javapatterns.Pattern
 
PatternMatchReject - Exception in de.unruh.javapatterns
 
PatternRunnable - Interface in de.unruh.javapatterns
 
Patterns - Class in de.unruh.javapatterns
This class contains static methods for constructing a number of different patterns.
Patterns.Instance<U> - Class in de.unruh.javapatterns
Pattern that matches if the matched value has a specific type U.
protectedBlock(PatternRunnable) - Method in class de.unruh.javapatterns.MatchManager
Executes a proctected block during a pattern match.

R

reject() - Static method in class de.unruh.javapatterns.Pattern
Should be called inside Pattern.apply(de.unruh.javapatterns.MatchManager, T) to indicate that the pattern did not match.
run() - Method in interface de.unruh.javapatterns.MatchRunnable
 
run() - Method in interface de.unruh.javapatterns.PatternRunnable
 

T

toString() - Method in class de.unruh.javapatterns.Capture
 
toString() - Method in class de.unruh.javapatterns.Pattern
Should give a human readable representation of this pattern.

V

v() - Method in class de.unruh.javapatterns.Capture
The current value of the capture.
value - Variable in exception de.unruh.javapatterns.MatchException
 

W

withCase(Pattern<? super In>, MatchRunnable<Exn>) - Static method in class de.unruh.javapatterns.Match
Constructs a Case object from a pattern and lambda expression returning void.
withCase(Pattern<? super In>, MatchSupplier<? extends Return, Exn>) - Static method in class de.unruh.javapatterns.Match
Constructs a Case object from a pattern and lambda expression.
A C D F I M N O P R T V W 
All Classes|All Packages