Class MatchFilter

java.lang.Object
fr.inria.rules.integraal.util.stream.filter.MatchFilter
All Implemented Interfaces:
Filter<Atom>

public class MatchFilter extends Object implements Filter<Atom>
Filter used for the match method as a post filter
Author:
Florent Tornil
  • Constructor Summary

    Constructors
    Constructor
    Description
    Filters the given atom iterator, removing atoms that do not match the given atom This can be used by storages that do not include filtering or generation of queries with the correct filters.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return true if the element must be kept, false if it must be filtered

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MatchFilter

      public MatchFilter(Atom atom, Substitution s)
      Filters the given atom iterator, removing atoms that do not match the given atom This can be used by storages that do not include filtering or generation of queries with the correct filters. An atom match another one if constants are the same and the same variables are instantiated by the same constant.
      Parameters:
      atom - the filter atom
      s - the filter substitution
  • Method Details

    • filter

      public boolean filter(Atom e)
      Description copied from interface: Filter
      Return true if the element must be kept, false if it must be filtered
      Specified by:
      filter in interface Filter<Atom>
      Parameters:
      e - the element to check
      Returns:
      true if the element must be kept, false if it must be filtered.