Class TypeFilter

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

public class TypeFilter extends Object implements Filter<Atom>
Tests whether an atom is isomorphic to a reference atom.
Author:
Florent Tornil
  • Constructor Details

    • TypeFilter

      public TypeFilter(AtomType type, Atom atom)
      Creates a type filter for atoms matching the supplied atom type.
      Parameters:
      type - type filter
      atom - atom filter
  • Method Details

    • filter

      public boolean filter(Atom e)
      Checks whether the supplied atom matches this type filter.
      Specified by:
      filter in interface Filter<Atom>
      Parameters:
      e - the atom to test
      Returns:
      true if the atom matches the expected type