Class Rule<A,B>

java.lang.Object
eu.bandm.tools.paisley.Rule<A,B>
All Implemented Interfaces:
Function<A,B>

public abstract class Rule<A,B> extends Object implements Function<A,B>
  • Constructor Details

    • Rule

      protected Rule(Pattern<? super A> left)
  • Method Details

    • match

      public boolean match(A target)
    • fire

      public abstract B fire()
    • apply

      public B apply(A target)
      Specified by:
      apply in interface Function<A,B>
    • applyAll

      public Iterable<B> applyAll(A target)
    • fresh

      protected <C> Variable<C> fresh()
    • fresh

      protected <C> Variable<C> fresh(String name)
    • rule

      public static <A, B> Rule<A,B> rule(Pattern<? super A> left, Supplier<? extends B> right)