Class FlatMultiTransform<A,B>

java.lang.Object
eu.bandm.tools.paisley.Pattern<B>
eu.bandm.tools.paisley.Unary<B,A>
eu.bandm.tools.paisley.FlatMultiTransform<A,B>
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
MultiTransform

public abstract class FlatMultiTransform<A,B> extends Unary<B,A>
See Also:
  • Constructor Details

    • FlatMultiTransform

      protected FlatMultiTransform(Pattern<? super B> body)
  • Method Details

    • match

      public boolean match(A target)
      Description copied from class: Pattern
      Attempts to match this pattern against a given object. If the class of this pattern imposes a specific order on matches, the first one is chosen.
      Specified by:
      match in class Pattern<A>
      Parameters:
      target - the object to match against
      Returns:
      true if the matching is successful, false if it fails. Which Variables are bound by a successful or failed match depends.
      See Also:
    • matchAgain

      public boolean matchAgain()
      Description copied from class: Pattern
      Attempts to re-match this pattern against a previously matched object. If the class of this pattern imposes a specific order on matches, they are chosen in that order, beginning with the second one. The behaviour of this method is unspecified if the last matching attempt of this pattern has not been successful.

      Patterns classes that do not override this method are deterministic. Pattern classes that overwrite this method to provide additional matches should also override Pattern.isDeterministic().

      Overrides:
      matchAgain in class Unary<B,A>
      Returns:
      true if the matching is successful, false if it fails. Which Variables are bound by a successful match depends. The default implementation always returns false.
      See Also:
    • cut

      public void cut(boolean recursively)
      Description copied from class: Pattern
      Disposes of all internal state related to nondeterminism.

      The default implementation does nothing. Subclasses that override this method should also override Pattern.clear(boolean) and ensure that it implies the effect of cut(false).

      Overrides:
      cut in class Unary<B,A>
      Parameters:
      recursively - true if all subpatterns should be deactivated, false otherwise.
    • open

      public abstract void open(A target)
    • close

      public abstract void close()
    • hasNext

      public abstract boolean hasNext()
    • next

      public abstract B next()
    • compileMatch

      protected void compileMatch(CompilationContext context)
      Overrides:
      compileMatch in class Pattern<A>
    • compileMatchAgain

      protected void compileMatchAgain(CompilationContext context)
      Overrides:
      compileMatchAgain in class Pattern<A>
    • compileMatchNext

      protected void compileMatchNext(CompilationContext context)
    • compileMatchNextBody

      protected void compileMatchNextBody(CompilationContext context)
    • compileOpen

      protected void compileOpen(CompilationContext context)
    • compileClose

      protected void compileClose(CompilationContext context)
    • compileHasNext

      protected void compileHasNext(CompilationContext context)
    • compileNext

      protected void compileNext(CompilationContext context)