Class MatchSearchState

java.lang.Object
es.ucm.maude.bindings.MatchSearchState
All Implemented Interfaces:
Iterable<Substitution>, Iterator<Substitution>

public class MatchSearchState extends Object implements Iterable<Substitution>, Iterator<Substitution>
An iterator through the matching a term into a pattern.
  • Method Details

    • delete

      public void delete()
    • iterator

      public Iterator<Substitution> iterator()
      Specified by:
      iterator in interface Iterable<Substitution>
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<Substitution>
    • next

      public Substitution next()
      Specified by:
      next in interface Iterator<Substitution>
    • __next

      public Substitution __next()
      Get the next match.

      Returns:
      A matching substitution or null pointer if
      there is no more matches.
    • fillContext

      public Term fillContext(Term term)
      Get the context of the match filled with the given term.

      Parameters:
      term - Term to fill the context.

      Returns:
      The original term with the matched subterm replaced by the given term.