Interface MatchFunction<T,​M>

  • Type Parameters:
    T - element type
    M - 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 (an Iterable of type M.
    • Method Detail

      • apply

        Iterable<M> apply​(@Nonnull
                          T element,
                          @Nonnull
                          T otherElement,
                          @Nonnull
                          AliasMap aliasMap)
        Compute a match result.
        Parameters:
        element - element on this side
        otherElement - element on the other side
        aliasMap - bindings that already have been established
        Returns:
        an Iterable of type M. The matching logic interprets the resulting Iterable. A non-empty Iterable is considered a successful match attempt; an empty Iterable is considered a failed match attempt.