Interface Motif<A,B>

All Superinterfaces:
Function<Pattern<? super A>,Pattern<B>>, Serializable
All Known Implementing Classes:
Motif.Star
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 Motif<A,B> extends Function<Pattern<? super A>,Pattern<B>>, Serializable
  • Method Details

    • apply

      Pattern<B> apply(Pattern<? super A> p)
      Specified by:
      apply in interface Function<A,B>
    • star

      static <A> Motif<A,A> star(Motif<A,A> f)
    • plus

      static <A> Motif<A,A> plus(Motif<A,A> f)
    • id

      static <A> Motif<A,A> id()
    • guard

      static <A> Motif<A,A> guard(Pattern<? super A> test)
    • guard

      static <A> Motif<A,A> guard(Predicate<? super A> test)
    • transform

      static <A, B> Motif<B,A> transform(Function<? super A,? extends B> fun)
    • either

      static <A, B> Motif<A,B> either(Motif<? extends A,? super B> left, Motif<? extends A,? super B> right)
    • both

      static <A, B> Motif<A,B> both(Motif<? extends A,? super B> left, Motif<? extends A,? super B> right)
    • on

      default <C> Motif<C,B> on(Motif<C,? super A> other)
    • then

      default <C> Motif<A,C> then(Motif<? extends B,C> other)
    • lazyBindings

      default Iterable<A> lazyBindings(B target)
    • eagerBindings

      default List<A> eagerBindings(B target)
    • lift

      static <A, B> Motif<A,B> lift(Function<? super B,? extends A> fun)
    • unlambda

      default Theme<A,B> unlambda()
    • attempt

      default boolean attempt(B target, Consumer<? super A> consumer)
    • exhaust

      default void exhaust(B target, Consumer<? super A> consumer)
    • etaExpand

      default Motif<A,B> etaExpand()
    • compile

      default Motif<A,B> compile()