Class Blockage<R,M,O>

java.lang.Object
eu.bandm.tools.ramus.runtime2.Action<R,M,O>
eu.bandm.tools.ramus.runtime2.Blockage<R,M,O>

public class Blockage<R,M,O> extends Action<R,M,O>
  • Constructor Details

    • Blockage

      public Blockage(O obstruction)
  • Method Details

    • getObstruction

      public final O getObstruction()
    • getLeafCount

      protected int getLeafCount()
      Specified by:
      getLeafCount in class Action<R,M,O>
    • bind

      public <S> Action<S,M,O> bind(Action.Continuation<? super R,S,M,O> cont)
      Description copied from class: Action
      Applies a monadic continuation to all leaves of this search tree (transition operation).
      Specified by:
      bind in class Action<R,M,O>
      Type Parameters:
      S - the output parsing result type of the continuation
      Parameters:
      cont - the continuation to apply
      Returns:
      an updated search tree
    • recycle

      <S> Action<S,M,O> recycle()
    • prune

      public <Q> Action<R,M,Q> prune()
      Description copied from class: Action
      Simplifies this search tree by removing redundant choice nodes and all obstructions (transition operation).
      Specified by:
      prune in class Action<R,M,O>
      Type Parameters:
      Q - the new type of obstructions
      Returns:
      a simplified search tree without nested or unary choice nodes
    • isEmpty

      public boolean isEmpty()
      Description copied from class: Action
      Checks whether this search tree is empty.
      Specified by:
      isEmpty in class Action<R,M,O>
      Returns:
      true iff this tree has no leaves
    • host

      public void host(Action.Visitor<? super R,M,O> v)
      Description copied from class: Action
      Performs a double dispatch to the appropriate method of a visitor.
      Specified by:
      host in class Action<R,M,O>
      Parameters:
      v - the visitor
    • toString

      public String toString()
      Overrides:
      toString in class Object