Interface MatchFunction<T,M>
-
- Type Parameters:
T
- element typeM
- type of intermediate result
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface MatchFunction<T,M>
An functional interface for a match function that computes a match result (anIterable
of typeM
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterable<M>
apply(T element, T otherElement, AliasMap aliasMap)
Compute a match result.
-
-
-
Method Detail
-
apply
Iterable<M> apply(@Nonnull T element, @Nonnull T otherElement, @Nonnull AliasMap aliasMap)
Compute a match result.- Parameters:
element
- element on this sideotherElement
- element on the other sidealiasMap
- bindings that already have been established- Returns:
- an
Iterable
of typeM
. The matching logic interprets the resultingIterable
. A non-emptyIterable
is considered a successful match attempt; an emptyIterable
is considered a failed match attempt.
-
-