Class DefaultRuleFactory

java.lang.Object
fr.lirmm.graphik.integraal.core.factory.DefaultRuleFactory
All Implemented Interfaces:
RuleFactory

public final class DefaultRuleFactory extends Object implements RuleFactory
Default singleton implementation of RuleFactory.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Method Details

    • instance

      public static DefaultRuleFactory instance()
      Returns the shared rule factory instance.
      Returns:
      the shared instance
    • create

      public Rule create()
      Description copied from interface: RuleFactory
      Creates an empty rule.
      Specified by:
      create in interface RuleFactory
      Returns:
      a new empty rule
    • create

      public Rule create(Atom[] body, Atom[] head)
      Description copied from interface: RuleFactory
      Creates a rule from arrays of body and head atoms.
      Specified by:
      create in interface RuleFactory
      Parameters:
      body - the body atoms
      head - the head atoms
      Returns:
      the created rule
    • create

      Description copied from interface: RuleFactory
      Creates a rule from iterators over body and head atoms.
      Specified by:
      create in interface RuleFactory
      Parameters:
      body - the body atom iterator
      head - the head atom iterator
      Returns:
      the created rule
    • create

      Description copied from interface: RuleFactory
      Creates a labeled rule from iterators over body and head atoms.
      Specified by:
      create in interface RuleFactory
      Parameters:
      label - the rule label
      body - the body atom iterator
      head - the head atom iterator
      Returns:
      the created rule
    • create

      public Rule create(InMemoryAtomSet body, InMemoryAtomSet head)
      Description copied from interface: RuleFactory
      Creates a rule from in-memory body and head atom sets.
      Specified by:
      create in interface RuleFactory
      Parameters:
      body - the rule body
      head - the rule head
      Returns:
      the created rule
    • create

      public Rule create(String label, InMemoryAtomSet body, InMemoryAtomSet head)
      Description copied from interface: RuleFactory
      Creates a labeled rule from in-memory body and head atom sets.
      Specified by:
      create in interface RuleFactory
      Parameters:
      label - the rule label
      body - the rule body
      head - the rule head
      Returns:
      the created rule
    • create

      public Rule create(Atom body, Atom head)
      Description copied from interface: RuleFactory
      Creates a rule from single body and head atoms.
      Specified by:
      create in interface RuleFactory
      Parameters:
      body - the body atom
      head - the head atom
      Returns:
      the created rule
    • create

      public Rule create(String label, Atom body, Atom head)
      Description copied from interface: RuleFactory
      Creates a labeled rule from single body and head atoms.
      Specified by:
      create in interface RuleFactory
      Parameters:
      label - the rule label
      body - the body atom
      head - the head atom
      Returns:
      the created rule
    • create

      public Rule create(Rule rule)
      Description copied from interface: RuleFactory
      Creates a copy of the provided rule.
      Specified by:
      create in interface RuleFactory
      Parameters:
      rule - the rule to copy
      Returns:
      the copied rule